Class: Haml::Identity
- Inherits:
-
Object
- Object
- Haml::Identity
- Defined in:
- lib/haml/identity.rb
Instance Method Summary collapse
- #generate
-
#initialize ⇒ Identity
constructor
A new instance of Identity.
Constructor Details
#initialize ⇒ Identity
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
|