Class: BirdFeed::Feed
- Inherits:
-
Object
- Object
- BirdFeed::Feed
- Defined in:
- lib/birdfeed/feed.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#items ⇒ Object
Returns the value of attribute items.
-
#link ⇒ Object
Returns the value of attribute link.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#raw_content ⇒ Object
Returns the value of attribute raw_content.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#xml ⇒ Object
Returns the value of attribute xml.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(format) {|_self| ... } ⇒ Feed
constructor
A new instance of Feed.
Constructor Details
#initialize(format) {|_self| ... } ⇒ Feed
Returns a new instance of Feed.
5 6 7 8 9 |
# File 'lib/birdfeed/feed.rb', line 5 def initialize(format, &block) @items = [] @format = format yield self if block_given? end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def description @description end |
#items ⇒ Object
Returns the value of attribute items.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def items @items end |
#link ⇒ Object
Returns the value of attribute link.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def link @link end |
#publisher ⇒ Object
Returns the value of attribute publisher.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def publisher @publisher end |
#raw_content ⇒ Object
Returns the value of attribute raw_content.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def raw_content @raw_content end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def updated_at @updated_at end |
#xml ⇒ Object
Returns the value of attribute xml.
3 4 5 |
# File 'lib/birdfeed/feed.rb', line 3 def xml @xml end |
Class Method Details
.parse(content) ⇒ Object
12 13 14 |
# File 'lib/birdfeed/feed.rb', line 12 def parse(content) Format.detect(content).parse(content) end |