URI mixin that adds method to get domain.
param name => tag name
param name => tag name
Add enclosure tags if present.
# File lib/tinyatom/feed.rb, line 102 def enclosure(markup, h) if h[:enclosure_type] and h[:enclosure_href] and h[:enclosure_title] options = {} h.each do |k,v| if EnclosureOptionalAttrs.include?(k) options[EnclosureOptionalAttrs[k]] = v end end link markup, 'enclosure', h[:enclosure_type], h[:enclosure_href], h[:enclosure_title], options end end
Create link tag.
# File lib/tinyatom/feed.rb, line 146 def link(markup, rel, type, href, title, options={}) markup.link({ :rel => rel, :type => type, :href => href, :title => title }.merge(options)) end
Add media:thumbnail tags if present.
# File lib/tinyatom/feed.rb, line 124 def media_thumbnail(markup, h) if h[:media_thumbnail_url] options = {} h.each do |k,v| if MediaThumbnailOptionalAttrs.include?(k) options[MediaThumbnailOptionalAttrs[k]] = v end end markup.media :thumbnail, { :url => h[:media_thumbnail_url] }.merge(options) end end
Generated with the Darkfish Rdoc Generator 2.