Class: Necromancer::ArrayConverters::ArrayToBooleanArrayConverter
- Inherits:
-
Converter
- Object
- Converter
- Necromancer::ArrayConverters::ArrayToBooleanArrayConverter
- Defined in:
- lib/necromancer/converters/array.rb
Overview
An object that converts an array to an array with boolean values
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(value, strict: config.strict) ⇒ Object
144 145 146 147 148 |
# File 'lib/necromancer/converters/array.rb', line 144 def call(value, strict: config.strict) bool_converter = BooleanConverters::StringToBooleanConverter.new(:string, :boolean) value.map { |val| bool_converter.(val, strict: strict) } end |