class Necromancer::HashConverters::StringToBooleanHashConverter
Public Instance Methods
call(value, strict: config.strict)
click to toggle source
Convert string value to hash with boolean values
@example
converter.call("a:yes b:no c:t") # => {a: true, b: false, c: true}
@api public
# 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