Class: Stitches::Configuration::NonNullInteger
- Inherits:
-
Object
- Object
- Stitches::Configuration::NonNullInteger
- Defined in:
- lib/stitches/configuration.rb
Instance Method Summary collapse
-
#initialize(name, value) ⇒ NonNullInteger
constructor
A new instance of NonNullInteger.
- #to_i ⇒ Object (also: #to_integer)
Constructor Details
#initialize(name, value) ⇒ NonNullInteger
Returns a new instance of NonNullInteger.
83 84 85 86 87 88 89 |
# File 'lib/stitches/configuration.rb', line 83 def initialize(name, value) unless value.is_a?(Integer) raise "#{name} must be an Integer, not a #{value.class}" end @value = value end |
Instance Method Details
#to_i ⇒ Object Also known as: to_integer
91 92 93 |
# File 'lib/stitches/configuration.rb', line 91 def to_i @value end |