Class: MongoModel::EmbeddedDocument

Inherits:
Object
  • Object
show all
Extended by:
Collection::PropertyDefaults, Map::PropertyDefaults
Includes:
AbstractClass, ActiveModelCompatibility, Associations, AttributeMethods, AttributeMethods::BeforeTypeCast, AttributeMethods::Dirty, AttributeMethods::Forbidden, AttributeMethods::MultiParameterAssignment, AttributeMethods::Nested, AttributeMethods::Protected, AttributeMethods::Query, AttributeMethods::Read, AttributeMethods::Write, Attributes, Callbacks, DocumentParent, Logging, Observing, PrettyInspect, Properties, RecordStatus, Serialization, Timestamps, Translation, Validations
Defined in:
lib/mongomodel/embedded_document.rb

Direct Known Subclasses

Document

Constant Summary

Collection =

Allow Collection class to be used in property definitions

MongoModel::Collection
Map =

Allow Map class to be used in property definitions

MongoModel::Map

Constants included from Callbacks

Callbacks::CALLBACKS

Instance Method Summary (collapse)

Methods included from Map::PropertyDefaults

property

Methods included from Collection::PropertyDefaults

property

Methods included from DocumentParent

#parent_document, #parent_document=

Methods included from AbstractClass

#inherited

Methods included from PrettyInspect

#inspect

Methods included from Serialization

#serializable_hash

Methods included from ActiveModelCompatibility

#persisted?, #to_key

Methods included from RecordStatus

#destroyed?, #initialize_with_record_status, #new_record?

Methods included from Logging

#logger

Methods included from AttributeMethods::Forbidden

#assign_attributes

Methods included from AttributeMethods::MultiParameterAssignment

#assign_attributes

Methods included from AttributeMethods::Dirty

#original_attributes, #write_attribute

Methods included from AttributeMethods::Protected

#assign_attributes

Methods included from AttributeMethods::BeforeTypeCast

#attributes_before_type_cast, #read_attribute_before_type_cast

Methods included from AttributeMethods::Query

#query_attribute

Methods included from AttributeMethods::Write

#[]=, #write_attribute

Methods included from AttributeMethods::Read

#[], #read_attribute

Methods included from AttributeMethods

#clone_attribute_value, #method_missing, #respond_to?

Methods included from Associations

#associations

Methods included from Callbacks

#initialize, #run_callbacks_with_embedded

Methods included from Validations

#valid?

Methods included from Properties

#properties

Methods included from Attributes

#assign_attributes, #attributes, #attributes=, #dup, #embedded_documents, #freeze, #frozen?, #initialize, #to_mongo

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MongoModel::AttributeMethods

Instance Method Details

- (Object) ==(other)



3
4
5
# File 'lib/mongomodel/embedded_document.rb', line 3

def ==(other)
  self.class == other.class && attributes == other.attributes
end