Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Marreck pmarreck

  • formerly desk.com, thredup.com and lifebooker.com. currently a contractor
  • Long Island, NY
  • Sign in to view email
View GitHub Profile
View Module_subclasses.rb
class Module
def subclasses
classes = []
ObjectSpace.each_object do |klass|
next unless Module === klass
classes << klass if self > klass
end
classes
end
end
You can’t perform that action at this time.