Class: Csv2hash::TypeCoercer
- Inherits:
-
Struct
- Object
- Struct
- Csv2hash::TypeCoercer
- Defined in:
- lib/csv2hash/coercers/type_coercer.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
2 3 4 |
# File 'lib/csv2hash/coercers/type_coercer.rb', line 2 def data @data end |
Instance Method Details
#deserialize! ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/csv2hash/coercers/type_coercer.rb', line 4 def deserialize! data.each do |line| line.each do |key, value| _value = value.to_s.strip.downcase change.each do |keys, v| line[key] = v if keys.include?(_value) end end end end |