Class: HQMF2JS::Generator::Counter

Inherits:
Object
  • Object
show all
Defined in:
lib/generator/js.rb

Overview

Simple class to issue monotonically increasing integer identifiers

Direct Known Subclasses

FunctionCounter, TemplateCounter

Instance Method Summary collapse

Constructor Details

#initializeCounter

Returns a new instance of Counter.



264
265
266
# File 'lib/generator/js.rb', line 264

def initialize
  @count = 0
end

Instance Method Details

#new_idObject



268
269
270
# File 'lib/generator/js.rb', line 268

def new_id
  @count+=1
end