redefine_method(method, &block)click to toggle source
# File lib/dbus/core_ext/module/remove_method.rb, line 10defredefine_method(method, &block)
remove_possible_method(method)
define_method(method, &block)
end
remove_possible_method(method)click to toggle source
# File lib/dbus/core_ext/module/remove_method.rb, line 4defremove_possible_method(method)
ifmethod_defined?(method) ||private_method_defined?(method)
undef_method(method)
endend