Class: Mandy::Mappers::PassThroughMapper

Inherits:
Base
  • Object
show all
Defined in:
lib/mandy/mappers/pass_through_mapper.rb

Constant Summary

Constants inherited from Task

Task::DEFAULT_COUNTER_GROUP, Task::KEY_VALUE_SEPERATOR, Task::NUMERIC_PADDING

Instance Attribute Summary

Attributes inherited from Task

#input_format, #output_format

Instance Method Summary collapse

Methods inherited from Base

compile, #execute

Methods included from IO::InputFormatting

#input_deserialize_key, #input_deserialize_value

Methods inherited from Task

#emit, #get, #initialize, #put

Constructor Details

This class inherits a constructor from Mandy::Task

Instance Method Details

#mapper(*params) ⇒ Object



4
5
6
7
# File 'lib/mandy/mappers/pass_through_mapper.rb', line 4

def mapper(*params)
  # default map is simply a pass-through
  params.size == 1 ? emit(params[0]) : emit(params[0], params[1])
end