class Consummo::ItemProducer

Public Class Methods

new(feeds: [], fetcher: FeedFetcher.new) click to toggle source
# File lib/consummo/item_producer.rb, line 3
def initialize(feeds: [], fetcher: FeedFetcher.new)
  @feeds = feeds
  @fetcher = fetcher
end

Public Instance Methods

produce() click to toggle source
# File lib/consummo/item_producer.rb, line 8
def produce
  @feeds.flat_map do |feed|
    @fetcher.fetch(feed)
  end.shuffle
end