Sha256: 420bdb897c6bb7ff8ece4accf8408856e9316f793a9716a41f15073a512d81a6

Contents?: true

Size: 1.38 KB

Versions: 9

Compression:

Stored size: 1.38 KB

Contents

module Feedjira

  module Parser
    # iTunes extensions to the standard RSS2.0 item
    # Source: http://www.apple.com/itunes/whatson/podcasts/specs.html
    class ITunesRSSItem
      include SAXMachine
      include FeedEntryUtilities

      element :author
      element :guid, :as => :entry_id
      element :title
      element :link, :as => :url
      element :description, :as => :summary
      element :"content:encoded", :as => :content
      element :pubDate, :as => :published

      # If author is not present use author tag on the item
      element :"itunes:author", :as => :itunes_author
      element :"itunes:block", :as => :itunes_block
      element :"itunes:duration", :as => :itunes_duration
      element :"itunes:explicit", :as => :itunes_explicit
      element :"itunes:keywords", :as => :itunes_keywords
      element :"itunes:subtitle", :as => :itunes_subtitle
      element :"itunes:image", :value => :href, :as => :itunes_image
      element :"itunes:isClosedCaptioned", :as => :itunes_closed_captioned
      element :"itunes:order", :as => :itunes_order
      # If summary is not present, use the description tag
      element :"itunes:summary", :as => :itunes_summary
      element :enclosure, :value => :length, :as => :enclosure_length
      element :enclosure, :value => :type, :as => :enclosure_type
      element :enclosure, :value => :url, :as => :enclosure_url
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
feedjira-2.0.0 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.6.0 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.5.0 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.4.0 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.3.1 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.3.0 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.2.0 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.1.0 lib/feedjira/parser/itunes_rss_item.rb
feedjira-1.0.0 lib/feedjira/parser/itunes_rss_item.rb