Class: Variable
- Inherits:
-
Object
- Object
- Variable
- Defined in:
- lib/mighty_json/variable.rb
Instance Method Summary collapse
- #cur ⇒ Object
-
#initialize ⇒ Variable
constructor
A new instance of Variable.
- #next ⇒ Object
Constructor Details
#initialize ⇒ Variable
Returns a new instance of Variable.
2 3 4 |
# File 'lib/mighty_json/variable.rb', line 2 def initialize @count = 0 end |
Instance Method Details
#cur ⇒ Object
11 12 13 |
# File 'lib/mighty_json/variable.rb', line 11 def cur "var#{@count}" end |
#next ⇒ Object
6 7 8 9 |
# File 'lib/mighty_json/variable.rb', line 6 def next @count += 1 cur end |