Class: IsoDoc::XrefGen::ReqCounter

Inherits:
Object
  • Object
show all
Defined in:
lib/isodoc/xref/xref_counter.rb

Instance Method Summary collapse

Constructor Details

#initializeReqCounter

one counter for each requirements label



8
9
10
# File 'lib/isodoc/xref/xref_counter.rb', line 8

def initialize
  @counters = {}
end

Instance Method Details

#increment(label, node) ⇒ Object



12
13
14
15
# File 'lib/isodoc/xref/xref_counter.rb', line 12

def increment(label, node)
  @counters[label] ||= Counter.new
  @counters[label].increment(node)
end