Sha256: 4b56e42ad6704772d6b6d0ead7f7f23d61e43d776db4dc9ece95513e380e04dc

Contents?: true

Size: 275 Bytes

Versions: 146

Compression:

Stored size: 275 Bytes

Contents

class Module
  def remove_possible_method(method)
    if method_defined?(method) || private_method_defined?(method)
      undef_method(method)
    end
  end

  def redefine_method(method, &block)
    remove_possible_method(method)
    define_method(method, &block)
  end
end

Version data entries

146 entries across 141 versions & 15 rubygems

Version Path
activesupport-4.2.11.3 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.11.2 lib/active_support/core_ext/module/remove_method.rb
motion-support-1.2.1 motion/core_ext/module/remove_method.rb
motion-support-1.1.1 motion/core_ext/module/remove_method.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/activesupport-4.2.11.1/lib/active_support/core_ext/module/remove_method.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/activesupport-4.2.11.1/lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.11.1 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.11 lib/active_support/core_ext/module/remove_method.rb
motion-support-1.2.0 motion/core_ext/module/remove_method.rb
activesupport-4.2.10 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.10.rc1 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.9 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.9.rc2 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.9.rc1 lib/active_support/core_ext/module/remove_method.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activesupport-4.2.8/lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.8 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.8.rc1 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.7.1 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.2.7 lib/active_support/core_ext/module/remove_method.rb
activesupport-4.1.16 lib/active_support/core_ext/module/remove_method.rb