Created
September 19, 2009 17:07
-
-
Save konklone/189531 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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