class Unique

Unique creates unique variable names.

Public Class Methods

next() click to toggle source

Get the next unique variable name.

# File lib/unique.rb, line 15
def self.next
  @@curr += 1
  "temp_#{@@curr}".intern
end
reset() click to toggle source

Reset current count back to zero. Mainly used for testing.

# File lib/unique.rb, line 8
def self.reset
  @@curr = 0
end