Class: Sail::Types::Integer
Overview
Integer
The Integer type manipulates the saved string value into integers.
Direct Known Subclasses
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/integer.rb', line 14 def from(value) value.to_i end |
#to_value ⇒ Object
10 11 12 |
# File 'lib/sail/types/integer.rb', line 10 def to_value @setting.value.to_i end |