Class: Sail::Types::Integer

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

Overview

Integer

The Integer type manipulates the saved string value into integers.

Direct Known Subclasses

Range

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/integer.rb', line 14

def from(value)
  value.to_i
end

#to_valueObject



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

def to_value
  @setting.value.to_i
end