This module provides an internal implementation to track descendants which is faster than iterating through ObjectSpace.
Methods
Class Public methods
# File activesupport/lib/active_support/descendants_tracker.rb, line 18 18: def self.clear 19: if defined? ActiveSupport::Dependencies 20: @@direct_descendants.each do |klass, descendants| 21: if ActiveSupport::Dependencies.autoloaded?(klass) 22: @@direct_descendants.delete(klass) 23: else 24: descendants.reject! { |v| ActiveSupport::Dependencies.autoloaded?(v) } 25: end 26: end 27: else 28: @@direct_descendants.clear 29: end 30: end
Instance Public methods