Class: ORB::Temple::Identity

Inherits:
Object
  • Object
show all
Defined in:
lib/orb/temple/identity.rb

Instance Method Summary collapse

Constructor Details

#initializeIdentity

Returns a new instance of Identity.



6
7
8
# File 'lib/orb/temple/identity.rb', line 6

def initialize
  @unique_id = 0
end

Instance Method Details

#generate(prefix = nil) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/orb/temple/identity.rb', line 10

def generate(prefix = nil)
  @unique_id += 1
  if prefix
    "_orb_compiler_#{prefix}_#{@unique_id}"
  else
    "_orb_compiler_#{@unique_id}"
  end
end