Class: Syndication::RSS::Feed
- Inherits:
-
Container
- Object
- Container
- Syndication::RSS::Feed
- Defined in:
- lib/syndication/rss.rb
Overview
Represents a parsed RSS feed, as returned by Syndication::RSS::Parser.
Instance Attribute Summary (collapse)
-
- (Object) channel
The Channel metadata and contents of the feed as a Syndication::Channel object.
-
- (Object) image
The image for the feed, as a Syndication::Image object.
-
- (Object) items
readonly
The items in the feed as an Array of Syndication::Item objects.
-
- (Object) textinput
The text input area as a Syndication::TextInput object.
Instance Method Summary (collapse)
-
- (Feed) initialize(parent, tag = nil, attrs = nil)
constructor
A new instance of Feed.
-
- (Object) item=(obj)
Add an item to the feed.
Methods inherited from Container
#parse_date, #store, #store_category, #strip, #tag2method, #tag_end, #tag_start
Constructor Details
- (Feed) initialize(parent, tag = nil, attrs = nil)
A new instance of Feed
280 281 282 283 284 |
# File 'lib/syndication/rss.rb', line 280 def initialize(parent, tag = nil, attrs = nil) # Explicitly initialize to nil to avoid warnings @items = @category = @skiphours = @skipdays = nil super end |
Instance Attribute Details
- (Object) channel
The Channel metadata and contents of the feed as a Syndication::Channel object
272 273 274 |
# File 'lib/syndication/rss.rb', line 272 def channel @channel end |
- (Object) image
The image for the feed, as a Syndication::Image object.
278 279 280 |
# File 'lib/syndication/rss.rb', line 278 def image @image end |
- (Object) items (readonly)
The items in the feed as an Array of Syndication::Item objects.
274 275 276 |
# File 'lib/syndication/rss.rb', line 274 def items @items end |
- (Object) textinput
The text input area as a Syndication::TextInput object.
276 277 278 |
# File 'lib/syndication/rss.rb', line 276 def textinput @textinput end |
Instance Method Details
- (Object) item=(obj)
Add an item to the feed.
287 288 289 290 291 292 |
# File 'lib/syndication/rss.rb', line 287 def item=(obj) if (!defined? @items) || (@items == nil) @items = Array.new end @items.push(obj) end |