Class: Necromancer::ArrayConverters::ArrayToFloatArrayConverter
- Inherits:
-
Converter
- Object
- Converter
- Necromancer::ArrayConverters::ArrayToFloatArrayConverter
- Defined in:
- lib/necromancer/converters/array.rb
Instance Attribute Summary
Attributes inherited from Converter
#config, #convert, #source, #target
Instance Method Summary collapse
Methods inherited from Converter
create, #initialize, #raise_conversion_type
Constructor Details
This class inherits a constructor from Necromancer::Converter
Instance Method Details
#call(array, strict: config.strict) ⇒ Object
110 111 112 113 114 |
# File 'lib/necromancer/converters/array.rb', line 110 def call(array, strict: config.strict) float_converter = NumericConverters::StringToFloatConverter.new(:string, :float) array.map { |val| float_converter.(val, strict: strict) } end |