Class: MingleEvents::Processors::Pipeline
- Inherits:
-
Object
- Object
- MingleEvents::Processors::Pipeline
- Defined in:
- lib/mingle_events/processors/pipeline.rb
Overview
Manages the passing of a stream of events through a sequence of processors
Instance Method Summary collapse
-
#initialize(processors) ⇒ Pipeline
constructor
A new instance of Pipeline.
- #process_events(events) ⇒ Object
Constructor Details
#initialize(processors) ⇒ Pipeline
Returns a new instance of Pipeline.
7 8 9 |
# File 'lib/mingle_events/processors/pipeline.rb', line 7 def initialize(processors) @processors = processors end |
Instance Method Details
#process_events(events) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/mingle_events/processors/pipeline.rb', line 11 def process_events(events) processed_events = events @processors.each do |processor| processed_events = processor.process_events(processed_events) end processed_events end |