class Necromancer::ArrayConverters::StringToIntegerArrayConverter

Public Instance Methods

call(string, strict: config.strict) click to toggle source

@example

converter.call("1,2,3") # => [1, 2, 3]

@api public

# 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