Sha256: a8d69ef714d22c03a41e89b5fe4a092b02adc9c55dc7ca6afc50bae19fa8f735

Contents?: true

Size: 196 Bytes

Versions: 71

Compression:

Stored size: 196 Bytes

Contents

##
# Unique creates unique variable names.

class Unique
  def self.reset # mostly for testing
    @@curr = 0
  end

  def self.next
    @@curr += 1
    "temp_#{@@curr}".intern
  end

  reset
end

Version data entries

71 entries across 69 versions & 6 rubygems

Version Path
sexp_processor-4.5.1 lib/unique.rb
sexp_processor-4.5.0 lib/unique.rb
sexp_processor-4.4.5 lib/unique.rb
sexp_processor-4.4.4 lib/unique.rb
sexp_processor-4.4.3 lib/unique.rb
sexp_processor-4.4.2 lib/unique.rb
sexp_processor-4.4.1 lib/unique.rb
sexp_processor-4.4.0 lib/unique.rb
sexp_processor-4.3.0 lib/unique.rb
sexp_processor-4.2.1 lib/unique.rb
sexp_processor-4.2.0 lib/unique.rb
sexp_processor-4.1.5 lib/unique.rb
sexp_processor-4.1.4 lib/unique.rb
sexp_processor-4.1.3 lib/unique.rb
sexp_processor-4.1.2 lib/unique.rb
sexp_processor-4.1.1 lib/unique.rb
sexp_processor-4.1.0 lib/unique.rb
sexp_processor-4.0.1 lib/unique.rb
sexp_processor-4.0.0 lib/unique.rb
sexp_processor-3.2.0 lib/unique.rb