Class: Humboldt::Mapper
Instance Attribute Summary
Attributes inherited from Processor
Class Method Summary collapse
Methods inherited from Processor
cleanup, #cleanup, input, output, setup, #setup, type_accessor
Class Method Details
.map(&block) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/humboldt/mapper.rb', line 6 def map(&block) define_method(:map) do |key, value, context| @in_key.hadoop = key @in_value.hadoop = value instance_exec(@in_key.ruby, @in_value.ruby, &block) end end |