instance method
apply
Ruby on Rails 7.0.10
Since v7.0.10Signature
apply(owner, path, line)
No documentation comment.
Parameters
-
ownerreq -
pathreq -
linereq
Source
# File activesupport/lib/active_support/code_generator.rb, line 25
def apply(owner, path, line)
unless @sources.empty?
@cache.module_eval("# frozen_string_literal: true\n" + @sources.join(";"), path, line)
end
@methods.each do |name, as|
owner.define_method(name, @cache.instance_method(as))
end
end
Defined in activesupport/lib/active_support/code_generator.rb line 25
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::CodeGenerator::MethodSet