I can't count the times I've found it useful to jump to console and
list the methods on an object. Of course, the default "methods" method
includes an extra 50 items. So I'm always typing "@object.methods -
Kernel.methods". Am I alone?
I wrote a patch that adds my_methods onto Object, which just acts as a
shortcut. I can understand if people don't think it belongs in the
core framework, but I think it's one of those small conveniences, like
Symbol#to_proc, that make Rails a pleasure.
I can't count the times I've found it useful to jump to console and
list the methods on an object. Of course, the default "methods" method
includes an extra 50 items. So I'm always typing "@object.methods -
Kernel.methods". Am I alone?
-1.
Just pass the argument false to #methods, i.e. @object.methods(false)
Or for a class, klass.instance_methods(false)
It should work for all the *methods family : instance_methods,
private_instance_methods, protected_instance_methods,
public_instance_methods, ... and so on.