This method is deprecated or moved on the latest stable version.
The last existing version (v2.3.8) is shown here.
subclasses_of(*superclasses)
public
Exclude this class unless it’s a subclass of our supers and is
defined. We check defined? in case we find a removed class that has yet to
be garbage collected. This also fails for anonymous classes — please
submit a patch if you have a workaround.
# File activesupport/lib/active_support/core_ext/object/extending.rb, line 13
def subclasses_of(*superclasses) #:nodoc:
subclasses = []
superclasses.each do |sup|
ObjectSpace.each_object(class << sup; self; end) do |k|
if k != sup && (k.name.blank? || eval("defined?(::#{k}) && ::#{k}.object_id == k.object_id"))
subclasses << k
end
end
end
subclasses
end