Class: Necromancer::HashConverters::StringToBooleanHashConverter
- Inherits:
-
Converter
- Object
- Converter
- Necromancer::HashConverters::StringToBooleanHashConverter
- Defined in:
- lib/necromancer/converters/hash.rb
Instance Attribute Summary
Attributes inherited from Converter
#config, #convert, #source, #target
Instance Method Summary collapse
-
#call(value, strict: config.strict) ⇒ Object
Convert string value to hash with boolean values.
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
Convert string value to hash with boolean values
95 96 97 98 99 100 |
# File 'lib/necromancer/converters/hash.rb', line 95 def call(value, strict: config.strict) bool_converter = BooleanConverters::StringToBooleanConverter.new(:string, :boolean) hash_converter = StringToHashConverter.new(:string, :hash) hash_converter.(value, strict: strict, value_converter: bool_converter) end |