Module: Tapioca::Runtime::Trackers
- Extended by:
- T::Sig
- Defined in:
- lib/tapioca/runtime/trackers.rb,
lib/tapioca/runtime/trackers/mixin.rb,
lib/tapioca/runtime/trackers/tracker.rb,
lib/tapioca/runtime/trackers/autoload.rb,
lib/tapioca/runtime/trackers/required_ancestor.rb,
lib/tapioca/runtime/trackers/constant_definition.rb
Defined Under Namespace
Modules: Autoload, ConstantDefinition, Mixin, RequiredAncestor, Tracker
Class Method Summary
collapse
Class Method Details
.disable_all! ⇒ Object
34
35
36
|
# File 'lib/tapioca/runtime/trackers.rb', line 34
def disable_all!
@trackers.each(&:disable!)
end
|
.register_tracker(tracker) ⇒ Object
39
40
41
|
# File 'lib/tapioca/runtime/trackers.rb', line 39
def register_tracker(tracker)
@trackers << tracker
end
|
.with_trackers_enabled(&blk) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/tapioca/runtime/trackers.rb', line 21
def with_trackers_enabled(&blk)
disable_all_method = method(:disable_all!)
define_singleton_method(:disable_all!) {}
blk.call
ensure
if disable_all_method
define_singleton_method(:disable_all!, disable_all_method)
end
end
|