Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/sharded_database/core_extensions.rb
Instance Method Summary collapse
Instance Method Details
#temporarily_undef_method(method, &block) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/sharded_database/core_extensions.rb', line 3 def temporarily_undef_method(method, &block) alias_method "original_#{method}", method undef_method(method) return yield ensure alias_method method, "original_#{method}" end |