Skip to content

Instantly share code, notes, and snippets.

@robertsosinski
Created January 16, 2010 05:21
Show Gist options
  • Save robertsosinski/278657 to your computer and use it in GitHub Desktop.
Save robertsosinski/278657 to your computer and use it in GitHub Desktop.
Quickly get a pruned method list for any object
class Object
def local_methods
parent = self.class.superclass
(parent ? self.methods - parent.instance_methods : self.methods).sort
end
alias_method :m, :local_methods
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment