Skip to content

Instantly share code, notes, and snippets.

@stephanschubert
Last active December 24, 2015 23:58
Show Gist options
  • Save stephanschubert/6883874 to your computer and use it in GitHub Desktop.
Save stephanschubert/6883874 to your computer and use it in GitHub Desktop.
Find all classes which include a module.
def using(klass)
Module.constants.find_all do |name|
klass > Object.const_get(name) if name != name.upcase
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment