Class: Arboretum::DocTree::Counters::Resetter

Inherits:
Object
  • Object
show all
Defined in:
lib/arboretum/doctree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Resetter

Returns a new instance of Resetter.



55
56
57
58
# File 'lib/arboretum/doctree.rb', line 55

def initialize(name)
  @name = name
  Counter.counters[name].resetters << self
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



53
54
55
# File 'lib/arboretum/doctree.rb', line 53

def name
  @name
end

Instance Method Details

#counterObject



60
61
62
# File 'lib/arboretum/doctree.rb', line 60

def counter
  Counter.counters[@name]
end