Class: Class
Instance Method Summary collapse
-
#all_subclasses ⇒ Object
Returns all subclasses.
Instance Method Details
#all_subclasses ⇒ Object
Returns all subclasses. Credit goes to stackoverflow.com/questions/436159/how-to-get-all-subclasses
10 11 12 13 14 |
# File 'lib/rubydraw/events.rb', line 10 def all_subclasses result = [] ObjectSpace.each_object(Class) { |klass| result << klass if klass < self } result end |