class Necromancer::ArrayConverters::ArrayToIntegerArrayConverter
Public Instance Methods
call(array, 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 98 def call(array, strict: config.strict) int_converter = NumericConverters::StringToIntegerConverter.new(:string, :integer) array.map { |val| int_converter.(val, strict: strict) } end