Module: Feedjira::RSSEntryUtilities
- Included in:
- Parser::ITunesRSSItem, Parser::RSSEntry, Parser::RSSFeedBurnerEntry
- Defined in:
- lib/feedjira/rss_entry_utilities.rb
Class Method Summary collapse
-
.included(mod) ⇒ Object
rubocop:todo Metrics/MethodLength.
Instance Method Summary collapse
-
#entry_id ⇒ Object
rubocop:enable Metrics/MethodLength.
- #id ⇒ Object
- #url ⇒ Object
Class Method Details
.included(mod) ⇒ Object
rubocop:todo Metrics/MethodLength
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/feedjira/rss_entry_utilities.rb', line 6 def self.included(mod) # rubocop:todo Metrics/AbcSize, Metrics/MethodLength mod.class_exec do element :title element :"content:encoded", as: :content element :"a10:content", as: :content element :description, as: :summary element :link, as: :url element :"a10:link", as: :url, value: :href element :author element :"dc:creator", as: :author element :"a10:name", as: :author element :pubDate, as: :published element :pubdate, as: :published element :issued, as: :published element :"dc:date", as: :published element :"dc:Date", as: :published element :"dcterms:created", as: :published element :"dcterms:modified", as: :updated element :"a10:updated", as: :updated element :guid, as: :entry_id, class: Feedjira::Parser::GloballyUniqueIdentifier element :"dc:identifier", as: :dc_identifier element :"media:thumbnail", as: :image, value: :url element :"media:content", as: :image, value: :url element :enclosure, as: :image, value: :url element :comments elements :category, as: :categories end end |
Instance Method Details
#entry_id ⇒ Object
rubocop:enable Metrics/MethodLength
45 46 47 |
# File 'lib/feedjira/rss_entry_utilities.rb', line 45 def entry_id @entry_id&.guid end |
#id ⇒ Object
53 54 55 |
# File 'lib/feedjira/rss_entry_utilities.rb', line 53 def id entry_id || @dc_identifier || @url end |
#url ⇒ Object
49 50 51 |
# File 'lib/feedjira/rss_entry_utilities.rb', line 49 def url @url || @entry_id&.url end |