Class: Nrename::Counter
- Inherits:
-
Object
- Object
- Nrename::Counter
- Defined in:
- lib/nrename/counter.rb
Instance Method Summary collapse
-
#initialize ⇒ Counter
constructor
A new instance of Counter.
- #next ⇒ Object
Constructor Details
#initialize ⇒ Counter
Returns a new instance of Counter.
3 4 5 |
# File 'lib/nrename/counter.rb', line 3 def initialize @counter = 0 end |
Instance Method Details
#next ⇒ Object
7 8 9 |
# File 'lib/nrename/counter.rb', line 7 def next @counter = @counter.next end |