Here's a useful one - If you ever need to check the methods of a ruby class/module (e.g. Math or User) you can call public_methods
to get the class methods and public_instance_methods
to get the instance ones.
The problem with this is that you'll also get entries for everything that it inherits from too, all the way up to Object methods like is_a?
and send
To get around that, because they return arrays, you can subtract the result from calling it on the base class, e.g. Math.public_methods - Module.public_methods
, or User.instance_methods - ActiveRecord::Base.instance_methods