Class: Consummo::FeedProcessor
- Inherits:
-
Object
- Object
- Consummo::FeedProcessor
- Defined in:
- lib/consummo/feed_processor.rb
Instance Method Summary collapse
-
#initialize(feeds = [], enrichers: []) ⇒ FeedProcessor
constructor
A new instance of FeedProcessor.
- #process ⇒ Object
Constructor Details
#initialize(feeds = [], enrichers: []) ⇒ FeedProcessor
Returns a new instance of FeedProcessor.
3 4 5 6 |
# File 'lib/consummo/feed_processor.rb', line 3 def initialize(feeds = [], enrichers: []) @feeds = feeds @enrichers = enrichers end |
Instance Method Details
#process ⇒ Object
8 9 10 11 12 |
# File 'lib/consummo/feed_processor.rb', line 8 def process producer = ItemProducer.new(feeds: @feeds) consumer = ItemConsumer.new(items: producer.produce, enrichers: @enrichers) persist(consumer.consume) end |