Class: Mongoid::Association::EagerLoad::Inclusion Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/association/eager_load/inclusion.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Something an eager load contributes to the pipeline, in the role it plays while the pipeline is built. A root is asked to contribute and the whole tree follows by recursion. AssociationInclusion stands for a single association; DiscriminatedInclusion stands for a name several subclasses share.

Direct Known Subclasses

AssociationInclusion, DiscriminatedInclusion

Instance Method Summary collapse

Instance Method Details

#contribute(destination, chain) ⇒ 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.

Add this inclusion's stages to the destination.

Parameters:

  • destination (Array<Hash>)

    The pipeline (or sub-pipeline) the stages are appended to.

  • chain (Array<Mongoid::Association::Relatable>)

    The embedded path accumulated from the ancestors above this inclusion (empty at the top).

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/mongoid/association/eager_load/inclusion.rb', line 20

def contribute(destination, chain)
  raise NotImplementedError
end