Class: ETL::Processor::BlockProcessor
- Inherits:
-
RowProcessor
- Object
- Processor
- RowProcessor
- ETL::Processor::BlockProcessor
- Defined in:
- lib/etl/processor/block_processor.rb
Overview
This processor is both a valid RowProcessor (called on each row with after_read) or a Processor (called once on pre_process or post_process)
Instance Method Summary collapse
-
#initialize(control, configuration) ⇒ BlockProcessor
constructor
A new instance of BlockProcessor.
- #process(row = nil) ⇒ Object
Methods inherited from RowProcessor
#ensure_columns_available_in_row!
Constructor Details
#initialize(control, configuration) ⇒ BlockProcessor
Returns a new instance of BlockProcessor.
5 6 7 8 |
# File 'lib/etl/processor/block_processor.rb', line 5 def initialize(control, configuration) super @block = configuration[:block] end |
Instance Method Details
#process(row = nil) ⇒ Object
9 10 11 |
# File 'lib/etl/processor/block_processor.rb', line 9 def process(row=nil) @block.call(row) end |