method

redefine_singleton_method

v5.2.3 - Show latest stable - Class: Module
redefine_singleton_method(method, &block)
public

Replaces the existing singleton method definition, if there is one, with the passed block as its body.