Class: Html2rss::RssBuilder::Item
- Inherits:
-
Object
- Object
- Html2rss::RssBuilder::Item
- Defined in:
- lib/html2rss/rss_builder/item.rb
Overview
Builds an <item> tag (with the provided maker).
Constant Summary collapse
- SPECIAL_TAGS =
Tags which should be processed every time and require non-trivial assignments/treatments.
%i[categories enclosure guid].freeze
Class Method Summary collapse
-
.add(maker, item, tags) ⇒ Object
Adds the item to the Item Maker.
Class Method Details
.add(maker, item, tags) ⇒ Object
Adds the item to the Item Maker
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/html2rss/rss_builder/item.rb', line 20 def self.add(maker, item, ) .each do |tag| next if SPECIAL_TAGS.include?(tag) maker.public_send(:"#{tag}=", item.public_send(tag)) end SPECIAL_TAGS.each do |tag| send(:"add_#{tag}", item, maker) end end |