I want to know which class method_missing is defined. It is defined in Object.
How can I figure out which class along the hierarchy overrides it?
I want to know which class method_missing is defined. It is defined in Object.
How can I figure out which class along the hierarchy overrides it?
You can use
UnboundMethod#ownermethod to check where the method is implemented:Note: If the method is implemented in module (which is later mixed into the class hierarchy somewhere),
ownerwill return this module.