Class: Sail::Types::Float

Inherits:
Type
  • Object
show all
Defined in:
lib/sail/types/float.rb

Overview

Float

The Float type manipulates the saved string value into floats.

Instance Method Summary collapse

Methods inherited from Type

#initialize

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_valueObject



10
11
12
# File 'lib/sail/types/float.rb', line 10

def to_value
  @setting.value.to_f
end