Method: Module#redefine_singleton_method
- Defined in:
- lib/active_support/core_ext/module/redefine_method.rb
#redefine_singleton_method(method, &block) ⇒ Object
Replaces the existing singleton method definition, if there is one, with the passed block as its body.
26 27 28 |
# File 'lib/active_support/core_ext/module/redefine_method.rb', line 26 def redefine_singleton_method(method, &block) singleton_class.redefine_method(method, &block) end |