Class: Yoda::Store::Query::Associators::AssociateAncestors Deprecated
- Inherits:
-
Object
- Object
- Yoda::Store::Query::Associators::AssociateAncestors
- Defined in:
- lib/yoda/store/query/associators/associate_ancestors.rb
Overview
Deprecated.
Use Yoda::Store::Query::AncestorTree instead.
Instance Attribute Summary collapse
- #registry ⇒ Registry readonly
Instance Method Summary collapse
- #associate(obj) ⇒ Enumerator<Objects::NamespaceObject>
-
#initialize(registry) ⇒ AssociateAncestors
constructor
A new instance of AssociateAncestors.
Constructor Details
#initialize(registry) ⇒ AssociateAncestors
Returns a new instance of AssociateAncestors.
13 14 15 |
# File 'lib/yoda/store/query/associators/associate_ancestors.rb', line 13 def initialize(registry) @registry = registry end |
Instance Attribute Details
#registry ⇒ Registry (readonly)
10 11 12 |
# File 'lib/yoda/store/query/associators/associate_ancestors.rb', line 10 def registry @registry end |
Instance Method Details
#associate(obj) ⇒ Enumerator<Objects::NamespaceObject>
19 20 21 22 23 24 25 |
# File 'lib/yoda/store/query/associators/associate_ancestors.rb', line 19 def associate(obj) if obj.is_a?(Objects::NamespaceObject) AncestorTree.new(registry: registry, object: obj).ancestors else [] end end |