Class: Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/mighty_json/variable.rb

Instance Method Summary collapse

Constructor Details

#initializeVariable

Returns a new instance of Variable.



4
5
6
# File 'lib/mighty_json/variable.rb', line 4

def initialize
  @count = 0
end

Instance Method Details

#curObject



13
14
15
# File 'lib/mighty_json/variable.rb', line 13

def cur
  "var#{@count}"
end

#nextObject



8
9
10
11
# File 'lib/mighty_json/variable.rb', line 8

def next
  @count += 1
  cur
end