Class: Class

Inherits:
Object show all
Defined in:
gems/carbuncle-support/mrblib/descendants.rb

Instance Method Summary collapse

Instance Method Details

#descendantsObject



2
3
4
5
6
7
8
9
10
# File 'gems/carbuncle-support/mrblib/descendants.rb', line 2

def descendants
  descendants = []
  ObjectSpace.each_object(singleton_class) do |k|
    next if k.singleton_class?

    descendants.unshift k unless k == self
  end
  descendants
end