Module: DescendantsFetcher
- Defined in:
- lib/descendants_fetcher.rb,
lib/descendants_fetcher/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
Instance Method Details
#descendants ⇒ Object
2 3 4 |
# File 'lib/descendants_fetcher.rb', line 2 def descendants ObjectSpace.each_object(singleton_class).to_a end |
#subclasses ⇒ Object
18 19 20 |
# File 'lib/descendants_fetcher.rb', line 18 def subclasses descendants.select! { |klass| klass.superclass == self } end |