class Module
copied from activesupport/core_ext from Rails, MIT license github.com/rails/rails/tree/5aa869861c192daceafe3a3ee50eb93f5a2b7bd2/activesupport/lib/active_support/core_ext
Public Instance Methods
redefine_method(method, &block)
click to toggle source
# File lib/dbus/core_ext/module/remove_method.rb, line 10 def redefine_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 4 def remove_possible_method(method) if method_defined?(method) || private_method_defined?(method) undef_method(method) end end