Module: MTrack::Mixin
- Defined in:
- lib/mtrack/mixin.rb
Overview
This module provides the #track_methods method to Classes or Modules that mix it in. It also enables the extended Class or Module to pass tracked methods to its subclasses and submodules.
Instance Method Summary collapse
-
#tracked_methods(group_name = nil) ⇒ Object
call-seq: tracked_methods(group_name = nil) => set.
Instance Method Details
#tracked_methods(group_name = nil) ⇒ Object
call-seq:
tracked_methods(group_name = nil) => set
Returns a set containing the currently tracked methods for a group_name.
class C
extend MTrack::Mixin
track_methods :my_group do
def method_1; end
def method_2; end
end
end
C.tracked_methods :my_group #=> #<Set: {:method_1, :method_2}>
90 91 92 |
# File 'lib/mtrack/mixin.rb', line 90 def tracked_methods(group_name = nil) @__mtrack__.tracked group_name end |