Class: Sail::Types::Float
Overview
Float
The Float type manipulates the saved string value into floats.
Instance Method Summary collapse
Methods inherited from Type
Constructor Details
This class inherits a constructor from Sail::Types::Type
Instance Method Details
#from(value) ⇒ Object
14 15 16 |
# File 'lib/sail/types/float.rb', line 14 def from(value) value.to_f end |
#to_value ⇒ Object
10 11 12 |
# File 'lib/sail/types/float.rb', line 10 def to_value @setting.value.to_f end |