Class: Necromancer::ArrayConverters::ArrayToIntegerArrayConverter
- Inherits:
-
Converter
- Object
- Converter
- Necromancer::ArrayConverters::ArrayToIntegerArrayConverter
- 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
98 99 100 101 102 |
# File 'lib/necromancer/converters/array.rb', line 98 def call(array, strict: config.strict) int_converter = NumericConverters::StringToIntegerConverter.new(:string, :integer) array.map { |val| int_converter.(val, strict: strict) } end |