Module: Toy::Extensions::Float

Defined in:
lib/toy/dynamo/extensions/float.rb

Instance Method Summary collapse

Instance Method Details

#from_store(value) ⇒ Object



8
9
10
# File 'lib/toy/dynamo/extensions/float.rb', line 8

def from_store(value, *)
  value.nil? ? nil : value.to_f
end

#to_store(value) ⇒ Object



4
5
6
# File 'lib/toy/dynamo/extensions/float.rb', line 4

def to_store(value, *)
  value.nil? ? nil : value.to_f
end