Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Created August 21, 2008 13:57
Show Gist options
  • Save jcoglan/6560 to your computer and use it in GitHub Desktop.
Save jcoglan/6560 to your computer and use it in GitHub Desktop.
class Module
def subclasses
classes = []
ObjectSpace.each_object do |klass|
next unless Module === klass
classes << klass if self > klass
end
classes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment