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.
10 11 12 |
# File 'lib/semian/simple_integer.rb', line 10 def initialize reset end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/semian/simple_integer.rb', line 8 def value @value end |
Instance Method Details
#destroy ⇒ Object
22 23 24 |
# File 'lib/semian/simple_integer.rb', line 22 def destroy reset end |
#increment(val = 1) ⇒ Object
14 15 16 |
# File 'lib/semian/simple_integer.rb', line 14 def increment(val = 1) @value += val end |
#reset ⇒ Object
18 19 20 |
# File 'lib/semian/simple_integer.rb', line 18 def reset @value = 0 end |