class Necromancer::HashConverters::StringToFloatHashConverter
Public Instance Methods
call(value, strict: config.strict)
click to toggle source
Convert string value to hash with float values
@example
converter.call("a:1 b:2 c:3") # => {a: 1.0, b: 2.0, c: 3.0}
@api public
# File lib/necromancer/converters/hash.rb, line 63 def call(value, strict: config.strict) float_converter = NumericConverters::StringToFloatConverter.new(:string, :float) hash_converter = StringToHashConverter.new(:string, :hash) hash_converter.(value, strict: strict, value_converter: float_converter) end