Class: Html2rss::FeedBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/html2rss/feed_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ FeedBuilder

Returns a new instance of FeedBuilder



6
7
8
# File 'lib/html2rss/feed_builder.rb', line 6

def initialize(config)
  @config = config
end

Instance Method Details

#rssRSS:Rss

Returns:

  • (RSS:Rss)


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