Class: ActiveSupport::ExecutionWrapper::CompleteHook
- Defined in:
- activesupport/lib/active_support/execution_wrapper.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#hook ⇒ Object
Returns the value of attribute hook.
Instance Method Summary collapse
- #before(target) ⇒ Object (also: #after)
Methods inherited from Struct
Instance Attribute Details
#hook ⇒ Object
Returns the value of attribute hook
32 33 34 |
# File 'activesupport/lib/active_support/execution_wrapper.rb', line 32 def hook @hook end |
Instance Method Details
#before(target) ⇒ Object Also known as: after
33 34 35 36 37 38 |
# File 'activesupport/lib/active_support/execution_wrapper.rb', line 33 def before(target) hook_state = target.send(:hook_state) if hook_state.key?(hook) hook.complete hook_state[hook] end end |