Created
July 14, 2015 19:46
-
-
Save slowernet/f5b425a89cfcc6938a2a 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
class Object | |
def interesting_methods | |
case self.class | |
when Class | |
self.public_methods.sort - Object.public_methods | |
when Module | |
self.public_methods.sort - Module.public_methods | |
else | |
self.public_methods.sort - Object.new.public_methods | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment