instance method
redefine_singleton_method
Ruby on Rails 5.2.8.1
Since v5.2.8.1Signature
redefine_singleton_method(method, &block)
Replaces the existing singleton method definition, if there is one, with the passed block as its body.
Parameters
-
methodreq -
blockblock
Source
# File activesupport/lib/active_support/core_ext/module/redefine_method.rb, line 35
def redefine_singleton_method(method, &block)
singleton_class.redefine_method(method, &block)
end
Defined in activesupport/lib/active_support/core_ext/module/redefine_method.rb line 35
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Module