Class: Semian::Simple::Integer
- Inherits:
-
Object
- Object
- Semian::Simple::Integer
- Defined in:
- lib/semian/simple_integer.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #destroy ⇒ Object
- #increment(val = 1) ⇒ Object
-
#initialize ⇒ Integer
constructor
A new instance of Integer.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Integer
Returns a new instance of Integer.
8 9 10 |
# File 'lib/semian/simple_integer.rb', line 8 def initialize reset end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/semian/simple_integer.rb', line 6 def value @value end |
Instance Method Details
#destroy ⇒ Object
20 21 22 |
# File 'lib/semian/simple_integer.rb', line 20 def destroy reset end |
#increment(val = 1) ⇒ Object
12 13 14 |
# File 'lib/semian/simple_integer.rb', line 12 def increment(val = 1) @value += val end |
#reset ⇒ Object
16 17 18 |
# File 'lib/semian/simple_integer.rb', line 16 def reset @value = 0 end |