Class: ActiveSupport::ExecutionWrapper::RunHook

Inherits:
Struct show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/execution_wrapper.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#as_json

Instance Attribute Details

#hookObject

Returns the value of attribute hook

Returns:

  • (Object)

    the current value of hook



26
27
28
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/execution_wrapper.rb', line 26

def hook
  @hook
end

Instance Method Details

#before(target) ⇒ Object



27
28
29
30
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/execution_wrapper.rb', line 27

def before(target)
  hook_state = target.send(:hook_state)
  hook_state[hook] = hook.run
end