class method self.method_added

Ruby on Rails edge

Since v7.2.3.2 Private — implementation detail, not part of the public API

Available in: v7.2.3.2 v8.0.5.1 v8.1.3.1 edge

Signature

self.method_added(name)

No documentation comment.

Parameters

name req
Source
# File activesupport/lib/active_support/current_attributes.rb, line 187
        def method_added(name)
          super

          # We try to generate instance delegators early to not rely on method_missing.
          return if name == :initialize

          # If the added method isn't public, we don't delegate it.
          return unless public_method_defined?(name)

          # If we already have a class method by that name, we don't override it.
          return if singleton_class.method_defined?(name) || singleton_class.private_method_defined?(name)

          Delegation.generate(singleton_class, [name], to: :instance, as: self, nilable: false)
        end

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

Defined in ActiveSupport::CurrentAttributes

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close