Class: Vorpal::OwnedObjectVisitor

Inherits:
Object
  • Object
show all
Includes:
AggregateVisitorTemplate
Defined in:
lib/vorpal/aggregate_utils.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOwnedObjectVisitor

Returns a new instance of OwnedObjectVisitor.



26
27
28
# File 'lib/vorpal/aggregate_utils.rb', line 26

def initialize
  @owned_objects = []
end

Instance Attribute Details

#owned_objectsObject (readonly)

Returns the value of attribute owned_objects.



24
25
26
# File 'lib/vorpal/aggregate_utils.rb', line 24

def owned_objects
  @owned_objects
end

Instance Method Details

#continue_traversal?(association_config) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/vorpal/aggregate_utils.rb', line 34

def continue_traversal?(association_config)
  association_config.owned
end

#visit_object(object, config) ⇒ Object



30
31
32
# File 'lib/vorpal/aggregate_utils.rb', line 30

def visit_object(object, config)
  @owned_objects << object
end