Class: Klam::VariableGenerator
- Inherits:
-
Object
- Object
- Klam::VariableGenerator
- Defined in:
- lib/klam/variable_generator.rb
Instance Method Summary collapse
-
#initialize ⇒ VariableGenerator
constructor
A new instance of VariableGenerator.
- #next ⇒ Object
Constructor Details
#initialize ⇒ VariableGenerator
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
#next ⇒ Object
7 8 9 10 |
# File 'lib/klam/variable_generator.rb', line 7 def next @index += 1 Klam::Variable.new('__KLAMV_%03d' % @index) end |