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.



335
336
337
# File 'lib/generator/js.rb', line 335

def initialize
  @count = 0
end

Instance Method Details

#new_idObject



339
340
341
# File 'lib/generator/js.rb', line 339

def new_id
  @count+=1
end