Skip to content

Instantly share code, notes, and snippets.

@stevegraham
Last active August 29, 2015 14:04
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 stevegraham/8f8caf2f08d874132a7c to your computer and use it in GitHub Desktop.
Save stevegraham/8f8caf2f08d874132a7c to your computer and use it in GitHub Desktop.
# Returns methods in the order of definition
FooClass.instance_methods(false)
=> [:methods, :excluding, :from, :superclass, :returned, :in, :the, :order, :they, :were, :defined]
# Returns a sorted list
FooClass.instance_methods - FooClass.superclass.instance_methods
=> [:defined, :excluding, :from, :in, :methods, :order, :returned, :superclass, :the, :they, :were]
# WAT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment