Class: ETL::Transform::BlockTransform

Inherits:
Transform
  • Object
show all
Defined in:
lib/etl/transform/block_transform.rb

Instance Attribute Summary

Attributes inherited from Transform

#configuration, #control, #name

Instance Method Summary collapse

Methods inherited from Transform

benchmarks, transform

Constructor Details

#initialize(control, name, configuration) ⇒ BlockTransform

Returns a new instance of BlockTransform.



4
5
6
7
# File 'lib/etl/transform/block_transform.rb', line 4

def initialize(control, name, configuration)
  super
  @block = configuration[:block]
end

Instance Method Details

#transform(name, value, row) ⇒ Object



8
9
10
# File 'lib/etl/transform/block_transform.rb', line 8

def transform(name, value, row)
  @block.call(name, value, row)
end