This module provides an internal implementation to track descendants which is faster than iterating through ObjectSpace.
Methods
- D
- I
- S
Class Public methods
descendants(klass) Link
direct_descendants(klass) Link
# File activesupport/lib/active_support/descendants_tracker.rb, line 11 def direct_descendants(klass) ActiveSupport::Deprecation.warn(<<~MSG) ActiveSupport::DescendantsTracker.direct_descendants is deprecated and will be removed in Rails 7.1. Use ActiveSupport::DescendantsTracker.subclasses instead. MSG subclasses(klass) end
store_inherited(klass, descendant) Link
This is the only method that is not thread safe, but is only ever called during the eager loading phase.
subclasses(klass) Link
Instance Public methods
descendants() Link
direct_descendants() Link
# File activesupport/lib/active_support/descendants_tracker.rb, line 92 def direct_descendants ActiveSupport::Deprecation.warn(<<~MSG) ActiveSupport::DescendantsTracker#direct_descendants is deprecated and will be removed in Rails 7.1. Use #subclasses instead. MSG subclasses end