Class: Mandy::Mappers::Base
- Includes:
- IO::InputFormatting
- Defined in:
- lib/mappers/base_mapper.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Task
Task::JSON_PAYLOAD_KEY, Task::KEY_VALUE_SEPERATOR, Task::NUMERIC_PADDING
Instance Attribute Summary
Attributes inherited from Task
Class Method Summary collapse
Instance Method Summary collapse
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
Class Method Details
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/mappers/base_mapper.rb', line 14 def execute @input.each_line do |line| key, value = line.split(KEY_VALUE_SEPERATOR, 2) key, value = nil, key if value.nil? value.chomp! mapper(input_deserialize_key(key), input_deserialize_value(value)) end end |