Class: Necromancer::ArrayConverters::StringToNumericArrayConverter
- Inherits:
-
Converter
- Object
- Converter
- Necromancer::ArrayConverters::StringToNumericArrayConverter
- Defined in:
- lib/necromancer/converters/array.rb
Instance Attribute Summary
Attributes inherited from Converter
#config, #convert, #source, #target
Instance Method Summary collapse
-
#call(string, strict: config.strict) ⇒ Object
Convert string value to array with numeric values.
Methods inherited from Converter
create, #initialize, #raise_conversion_type
Constructor Details
This class inherits a constructor from Necromancer::Converter
Instance Method Details
#call(string, strict: config.strict) ⇒ Object
Convert string value to array with numeric values
85 86 87 88 89 90 |
# File 'lib/necromancer/converters/array.rb', line 85 def call(string, strict: config.strict) array_converter = StringToArrayConverter.new(:string, :array) array = array_converter.(string, strict: strict) num_converter = ArrayToNumericArrayConverter.new(:array, :numeric) num_converter.(array, strict: strict) end |