class Necromancer::ArrayConverters::StringToBooleanArrayConverter

Public Instance Methods

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

@example

converter.call("t,f,yes,no") # => [true, false, true, false]

@param [Array] value

the array value to boolean

@api public

# File lib/necromancer/converters/array.rb, line 44
def call(value, strict: config.strict)
  array_converter = StringToArrayConverter.new(:string, :array)
  array = array_converter.(value, strict: strict)
  bool_converter = ArrayToBooleanArrayConverter.new(:array, :boolean)
  bool_converter.(array, strict: strict)
end