Last active
August 29, 2015 14:13
-
-
Save aaronaddleman/52c662c024aeee089595 to your computer and use it in GitHub Desktop.
Show important methods for a ruby object
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
# Method 1 | |
class Object | |
# Return only the methods not present on basic objects | |
def interesting_methods | |
(self.methods - Object.instance_methods).sort | |
end | |
end | |
# Method 2 | |
Class.instance_methods(false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment