Class: Cucumber::Messages::Helpers::IdGenerator::Incrementing
- Inherits:
-
Object
- Object
- Cucumber::Messages::Helpers::IdGenerator::Incrementing
- Defined in:
- lib/cucumber/messages/helpers/id_generator/incrementing.rb
Instance Method Summary collapse
-
#initialize ⇒ Incrementing
constructor
A new instance of Incrementing.
- #new_id ⇒ Object
Constructor Details
#initialize ⇒ Incrementing
Returns a new instance of Incrementing.
8 9 10 |
# File 'lib/cucumber/messages/helpers/id_generator/incrementing.rb', line 8 def initialize @index = -1 end |
Instance Method Details
#new_id ⇒ Object
12 13 14 15 |
# File 'lib/cucumber/messages/helpers/id_generator/incrementing.rb', line 12 def new_id @index += 1 @index.to_s end |