Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/ext/vendored_activesupport.rb
Instance Method Summary collapse
Instance Method Details
#redefine_method(method, &block) ⇒ Object
15 16 17 18 |
# File 'lib/ext/vendored_activesupport.rb', line 15 def redefine_method(method, &block) remove_possible_method(method) define_method(method, &block) end |
#remove_possible_method(method) ⇒ Object
9 10 11 12 13 |
# File 'lib/ext/vendored_activesupport.rb', line 9 def remove_possible_method(method) if method_defined?(method) || private_method_defined?(method) undef_method(method) end end |