Method: Mongoid::Relations::Binding#initialize

Defined in:
lib/mongoid/relations/binding.rb

#initialize(base, target, metadata) ⇒ Binding

Create the new binding.

Examples:

Initialize a binding.

Binding.new(base, target, )

Parameters:

  • base (Document)

    The base of the binding.

  • target (Document, Array<Document>)

    The target of the binding.

  • metadata (Metadata)

    The relation’s metadata.

Since:

  • 2.0.0.rc.1



21
22
23
# File 'lib/mongoid/relations/binding.rb', line 21

def initialize(base, target, )
  @base, @target,  = base, target, 
end