Module: Dry::Core::DescendantsTracker
- Defined in:
- lib/dry/core/descendants_tracker.rb
Overview
An implementation of descendants tracker, heavily inspired by the descendants_tracker gem.
Instance Attribute Summary collapse
-
#descendants ⇒ Array<Class>
readonly
Return the descendants of this class.
Class Method Summary collapse
- .setup(target) ⇒ Object private
Instance Attribute Details
#descendants ⇒ Array<Class> (readonly)
Return the descendants of this class
54 55 56 |
# File 'lib/dry/core/descendants_tracker.rb', line 54 def descendants @descendants end |
Class Method Details
.setup(target) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/dry/core/descendants_tracker.rb', line 32 def setup(target) target.instance_variable_set(:@descendants, Concurrent::Array.new) end |