Class: Necromancer::ArrayConverters::StringToIntegerArrayConverter
- Inherits:
-
Converter
- Object
- Converter
- Necromancer::ArrayConverters::StringToIntegerArrayConverter
- 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(string, strict: config.strict) ⇒ Object
57 58 59 60 61 62 |
# File 'lib/necromancer/converters/array.rb', line 57 def call(string, strict: config.strict) array_converter = StringToArrayConverter.new(:string, :array) array = array_converter.(string, strict: strict) int_converter = ArrayToIntegerArrayConverter.new(:array, :integers) int_converter.(array, strict: strict) end |