Class: IsoDoc::XrefGen::ReqCounter
- Inherits:
-
Object
- Object
- IsoDoc::XrefGen::ReqCounter
- Defined in:
- lib/isodoc/xref/xref_counter.rb
Instance Method Summary collapse
- #increment(label, node) ⇒ Object
-
#initialize ⇒ ReqCounter
constructor
one counter for each requirements label.
Constructor Details
#initialize ⇒ ReqCounter
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 |