Class: Html2rss::FeedBuilder
- Inherits:
-
Object
- Object
- Html2rss::FeedBuilder
- Defined in:
- lib/html2rss/feed_builder.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(feed_config) ⇒ FeedBuilder
constructor
A new instance of FeedBuilder.
- #rss ⇒ Object
Constructor Details
#initialize(feed_config) ⇒ FeedBuilder
Returns a new instance of FeedBuilder.
8 9 10 |
# File 'lib/html2rss/feed_builder.rb', line 8 def initialize(feed_config) @config = feed_config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/html2rss/feed_builder.rb', line 6 def config @config end |
Instance Method Details
#rss ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/html2rss/feed_builder.rb', line 12 def rss RSS::Maker.make('2.0') do |maker| add_channel_to_maker(maker) feed_items.map do |feed_item| add_item_to_items(feed_item, maker.items) end end end |