From: Horacio Sanson Date: 2005-10-24T20:05:43+09:00 Subject: How to find all the subclasses of a class? I want to be able to list and instatiate all subclasses of a class to create a Factory type pattern, I want to be able to do something like subclasses = Array.new ## Magic code that puts all subclasses of a class in ## the subclasses array subclasses = get_subclasses( .... ) subclasses.each { |subclass| return subclass.new if condition == true end sorry I am very new to Ruby and have no idea on how to do this. any help is appreciated. Horacio