instance method apply

Ruby on Rails 8.0.4

Since v7.0.10

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

apply(owner, path, line)

No documentation comment.

Parameters

owner req
path req
line req
Source
# File activesupport/lib/active_support/code_generator.rb, line 28
      def apply(owner, path, line)
        unless @sources.empty?
          @cache.module_eval("# frozen_string_literal: true\n" + @sources.join(";"), path, line)
        end
        @canonical_methods.clear

        @methods.each do |as, canonical_name|
          owner.define_method(as, @cache.instance_method(canonical_name))
        end
      end

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

Defined in ActiveSupport::CodeGenerator::MethodSet

Type at least 2 characters to search.

↑↓ navigate · open · esc close