Class: CruftTracker::Registry
- Inherits:
-
Object
- Object
- CruftTracker::Registry
- Includes:
- Singleton
- Defined in:
- lib/cruft_tracker/registry.rb
Instance Attribute Summary collapse
-
#tracked_methods ⇒ Object
Returns the value of attribute tracked_methods.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
21 22 23 |
# File 'lib/cruft_tracker/registry.rb', line 21 def initialize @tracked_methods = [] end |
Instance Attribute Details
#tracked_methods ⇒ Object
Returns the value of attribute tracked_methods.
7 8 9 |
# File 'lib/cruft_tracker/registry.rb', line 7 def tracked_methods @tracked_methods end |
Class Method Details
.<<(tracked_method) ⇒ Object
9 10 11 |
# File 'lib/cruft_tracker/registry.rb', line 9 def self.<<(tracked_method) instance.tracked_methods << tracked_method end |
.include?(tracked_method) ⇒ Boolean
13 14 15 |
# File 'lib/cruft_tracker/registry.rb', line 13 def self.include?(tracked_method) instance.tracked_methods.include?(tracked_method) end |
.reset ⇒ Object
17 18 19 |
# File 'lib/cruft_tracker/registry.rb', line 17 def self.reset instance.tracked_methods = [] end |