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.



2
3
4
# File 'lib/mighty_json/variable.rb', line 2

def initialize
  @count = 0
end

Instance Method Details

#curObject



11
12
13
# File 'lib/mighty_json/variable.rb', line 11

def cur
  "var#{@count}"
end

#nextObject



6
7
8
9
# File 'lib/mighty_json/variable.rb', line 6

def next
  @count += 1
  cur
end