Class: FeedParser::RssItem

Inherits:
FeedItem show all
Defined in:
lib/feed_parser/feed_item.rb

Instance Attribute Summary

Attributes inherited from FeedItem

#type

Instance Method Summary collapse

Methods inherited from FeedItem

#as_json, #method_missing

Constructor Details

#initialize(item) ⇒ RssItem

Returns a new instance of RssItem.



68
69
70
71
72
73
# File 'lib/feed_parser/feed_item.rb', line 68

def initialize(item)
  @type = :rss
  super
  @link = item.xpath(Dsl[@type][:item_link]).text.strip
  @categories = item.xpath(Dsl[@type][:item_categories]).map{|cat| cat.text}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FeedParser::FeedItem