Class: Haml::Identity

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

Instance Method Summary collapse

Constructor Details

#initializeIdentity

Returns a new instance of Identity.



4
5
6
# File 'lib/haml/identity.rb', line 4

def initialize
  @unique_id = 0
end

Instance Method Details

#generate



8
9
10
11
# File 'lib/haml/identity.rb', line 8

def generate
  @unique_id += 1
  "_haml_compiler#{@unique_id}"
end