Class: Nfcollector::SequenceGenerator
- Inherits:
-
Object
- Object
- Nfcollector::SequenceGenerator
- Defined in:
- lib/nfcollector/sequence_generator.rb
Instance Method Summary collapse
-
#initialize ⇒ SequenceGenerator
constructor
A new instance of SequenceGenerator.
- #next ⇒ Object
Constructor Details
#initialize ⇒ SequenceGenerator
Returns a new instance of SequenceGenerator.
3 4 5 |
# File 'lib/nfcollector/sequence_generator.rb', line 3 def initialize @start = 0 # TODO: This will have to be smarter (needs to keep a track of the last used value somewhere) end |
Instance Method Details
#next ⇒ Object
7 8 9 |
# File 'lib/nfcollector/sequence_generator.rb', line 7 def next @start += 1 end |