Class: ETL::Processor::BlockProcessor

Inherits:
RowProcessor show all
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)

Constructor Details

- (BlockProcessor) initialize(control, configuration)

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

- (Object) process(row = nil)



9
10
11
# File 'lib/etl/processor/block_processor.rb', line 9

def process(row=nil)
  @block.call(row)
end