Class: Humble::DefaultDataRowMapper
- Inherits:
-
Object
- Object
- Humble::DefaultDataRowMapper
- Defined in:
- lib/humble/default_data_row_mapper.rb
Instance Method Summary collapse
-
#initialize(configuration) ⇒ DefaultDataRowMapper
constructor
A new instance of DefaultDataRowMapper.
- #map_from(row) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ DefaultDataRowMapper
Returns a new instance of DefaultDataRowMapper.
3 4 5 |
# File 'lib/humble/default_data_row_mapper.rb', line 3 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#map_from(row) ⇒ Object
7 8 9 |
# File 'lib/humble/default_data_row_mapper.rb', line 7 def map_from(row) @configuration[:type].new(row) end |