This module provides an internal implementation to track descendants which is faster than iterating through ObjectSpace.
# File 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
# File lib/active_support/descendants_tracker.rb, line 41 41: def descendants 42: DescendantsTracker.descendants(self) 43: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.