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.



302
303
304
# File 'lib/generator/js.rb', line 302

def initialize
  @count = 0
end

Instance Method Details

#new_idObject



306
307
308
# File 'lib/generator/js.rb', line 306

def new_id
  @count+=1
end