Module: DeepCover::ExecCallbacks
- Extended by:
- ModuleOverride
- Defined in:
- lib/deep_cover/core_ext/exec_callbacks.rb
Class Attribute Summary collapse
-
.callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
Attributes included from ModuleOverride
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ModuleOverride
Class Attribute Details
.callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
10 11 12 |
# File 'lib/deep_cover/core_ext/exec_callbacks.rb', line 10 def callbacks @callbacks end |
Class Method Details
.before_exec(&block) ⇒ Object
12 13 14 15 |
# File 'lib/deep_cover/core_ext/exec_callbacks.rb', line 12 def before_exec(&block) self.active = true (@callbacks ||= []) << block end |
Instance Method Details
#exec(*args) ⇒ Object
18 19 20 21 |
# File 'lib/deep_cover/core_ext/exec_callbacks.rb', line 18 def exec(*args) ExecCallbacks.callbacks.each(&:call) exec_without_deep_cover(*args) end |