Class: Mongoid::Associations::MetaData

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

Overview

:nodoc:

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



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

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

Instance Attribute Details

#associationObject (readonly)

Returns the value of attribute association.



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

def association
  @association
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end