Class: FeedParser::AtomItem
- Defined in:
- lib/feed_parser/feed_item.rb
Instance Attribute Summary
Attributes inherited from FeedItem
Instance Method Summary collapse
-
#initialize(item) ⇒ AtomItem
constructor
A new instance of AtomItem.
- #published ⇒ Object
Methods inherited from FeedItem
Constructor Details
#initialize(item) ⇒ AtomItem
Returns a new instance of AtomItem.
77 78 79 80 81 82 83 |
# File 'lib/feed_parser/feed_item.rb', line 77 def initialize(item) @type = :atom super @link = item.xpath(Dsl[@type][:item_link]).attribute("href").text.strip @updated = parse_datetime(item.xpath(Dsl[@type][:item_updated]).text) @categories = item.xpath(Dsl[@type][:item_categories]).map{|cat| cat.attribute("term").text} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FeedParser::FeedItem
Instance Method Details
#published ⇒ Object
85 86 87 |
# File 'lib/feed_parser/feed_item.rb', line 85 def published @published ||= @updated end |