Skip to content

Instantly share code, notes, and snippets.

@konklone
Created September 19, 2009 17:07
Show Gist options
  • Save konklone/189531 to your computer and use it in GitHub Desktop.
Save konklone/189531 to your computer and use it in GitHub Desktop.
# Put it in your .irbrc, then you can see the methods of an object or class, besides the ones Object gives to everyone.
def m(obj)
if obj.is_a? Class
obj.methods.sort - Object.methods
else
obj.methods.sort - Object.new.methods
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment