Class: Podcastinator::Feed
Direct Known Subclasses
Defined Under Namespace
Classes: Item
Constant Summary collapse
- FIELDS =
%i( author copyright description image_url items keywords language owner_name owner_email subtitle title url )
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Feed
constructor
A new instance of Feed.
Constructor Details
#initialize(options = {}) ⇒ Feed
Returns a new instance of Feed.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/podcastinator/feed.rb', line 22 def initialize( = {}) FIELDS.each do |field| instance_variable_set("@#{ field }", [field] || [field.to_s]) end if @items.kind_of? Array @items.map! do |item| if item.kind_of? Hash Item.new(item) else item end end end end |