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



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

def initialize
  @counters = {}
end

Instance Method Details

#increment(label, node) ⇒ Object



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

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