Class: Mongoid::Associations::MetaData

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/associations/meta_data.rb

Overview

This class contains metadata about association proxies.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(association, options) ⇒ MetaData

Create the new associations MetaData object, which holds the type of the association and its options, with convenience methods for getting that information.

Options:

association: The association type as a class instance. options: The association options



24
25
26
# File 'lib/mongoid/associations/meta_data.rb', line 24

def initialize(association, options)
  @association, @options = association, options
end

Instance Attribute Details

#associationObject (readonly)

Returns the value of attribute association.



7
8
9
# File 'lib/mongoid/associations/meta_data.rb', line 7

def association
  @association
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/mongoid/associations/meta_data.rb', line 7

def options
  @options
end