Class: Cucumber::Messages::Helpers::IdGenerator::Incrementing

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/messages/helpers/id_generator/incrementing.rb

Instance Method Summary collapse

Constructor Details

#initializeIncrementing

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_idObject



12
13
14
15
# File 'lib/cucumber/messages/helpers/id_generator/incrementing.rb', line 12

def new_id
  @index += 1
  @index.to_s
end