Skip to content

Instantly share code, notes, and snippets.

@slowernet
Created July 14, 2015 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slowernet/f5b425a89cfcc6938a2a to your computer and use it in GitHub Desktop.
Save slowernet/f5b425a89cfcc6938a2a to your computer and use it in GitHub Desktop.
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