Class: Klam::VariableGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/klam/variable_generator.rb

Instance Method Summary collapse

Constructor Details

#initializeVariableGenerator

Returns a new instance of VariableGenerator.



3
4
5
# File 'lib/klam/variable_generator.rb', line 3

def initialize
  @index = 0
end

Instance Method Details

#nextObject



7
8
9
10
# File 'lib/klam/variable_generator.rb', line 7

def next
  @index += 1
  Klam::Variable.new('__KLAMV_%03d' % @index)
end