instance method execute_hook

Ruby on Rails 8.0.4

Since v5.2.8.1 Private

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

execute_hook(name, base, options, block)

No documentation comment.

Parameters

name req
base req
options req
block req
Source
# File activesupport/lib/active_support/lazy_load_hooks.rb, line 91
      def execute_hook(name, base, options, block)
        with_execution_control(name, block, options[:run_once]) do
          if options[:yield]
            block.call(base)
          else
            if base.is_a?(Module)
              base.class_eval(&block)
            else
              base.instance_eval(&block)
            end
          end
        end
      end

Defined in activesupport/lib/active_support/lazy_load_hooks.rb line 91 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::LazyLoadHooks

Type at least 2 characters to search.

↑↓ navigate · open · esc close