Class: FeedzirraPodcast::Parser::RSS2Item
- Inherits:
-
Object
- Object
- FeedzirraPodcast::Parser::RSS2Item
- Includes:
- Feedzirra::FeedEntryUtilities, SAXMachine
- Defined in:
- lib/feedzirra-podcast/parser/rss2_item.rb
Direct Known Subclasses
Instance Method Summary collapse
- #enclosure ⇒ Object
- #pubDate ⇒ Object (also: #pub_date, #pubdate)
- #source ⇒ Object
Instance Method Details
#enclosure ⇒ Object
39 40 41 |
# File 'lib/feedzirra-podcast/parser/rss2_item.rb', line 39 def enclosure Struct.new(:url, :length, :type).new(enclosure_url, enclosure_length.try(:to_f), enclosure_type) end |
#pubDate ⇒ Object Also known as: pub_date, pubdate
27 28 29 30 31 |
# File 'lib/feedzirra-podcast/parser/rss2_item.rb', line 27 def pubDate Time.parse(pub_date_string).utc if pub_date_string.present? rescue ArgumentError nil end |
#source ⇒ Object
35 36 37 |
# File 'lib/feedzirra-podcast/parser/rss2_item.rb', line 35 def source Struct.new(:title, :url).new(source_title, source_url) end |