class YYFeed::Feed
rss2.0 & rss1.0 & atom specs are integrated within this class.
Attributes
content[RW]
items[RW]
Public Class Methods
new()
click to toggle source
# File lib/YYFeed.rb, line 20 def initialize @content = nil @items = Array.new end
Public Instance Methods
description()
click to toggle source
# File lib/YYFeed.rb, line 41 def description if @content.feed_type == "atom" return "" elsif @content.feed_type == "rss" return @content.channel.description end end
link()
click to toggle source
# File lib/YYFeed.rb, line 33 def link if @content.feed_type == "atom" return @content.link.href elsif @content.feed_type == "rss" return @content.channel.link end end
title()
click to toggle source
# File lib/YYFeed.rb, line 25 def title if @content.feed_type == "atom" return @content.title.content elsif @content.feed_type == "rss" return @content.channel.title end end