Class: ActiveSupport::ExecutionWrapper::RunHook
- 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
Methods inherited from Struct
Instance Attribute Details
#hook ⇒ Object
Returns the value of attribute hook
26 27 28 |
# File 'activesupport/lib/active_support/execution_wrapper.rb', line 26 def hook @hook end |
Instance Method Details
#before(target) ⇒ Object
27 28 29 30 |
# File 'activesupport/lib/active_support/execution_wrapper.rb', line 27 def before(target) hook_state = target.send(:hook_state) hook_state[hook] = hook.run end |