Class: Arboretum::DocTree::Counters::Incrementer
- Inherits:
-
Object
- Object
- Arboretum::DocTree::Counters::Incrementer
- Defined in:
- lib/arboretum/doctree.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #counter ⇒ Object
-
#initialize(name) ⇒ Incrementer
constructor
A new instance of Incrementer.
Constructor Details
#initialize(name) ⇒ Incrementer
Returns a new instance of Incrementer.
41 42 43 44 45 |
# File 'lib/arboretum/doctree.rb', line 41 def initialize(name) @name = name @value = 0 Counter.counters[name].incrementers << self end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
38 39 40 |
# File 'lib/arboretum/doctree.rb', line 38 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
39 40 41 |
# File 'lib/arboretum/doctree.rb', line 39 def value @value end |