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