Class: MongoModel::Document

Constant Summary

Constant Summary

Constants included from MongoModel::DocumentExtensions::CollectionModifiers

MongoModel::DocumentExtensions::CollectionModifiers::METHODS

Constants inherited from EmbeddedDocument

EmbeddedDocument::Collection, EmbeddedDocument::Map

Constants included from Callbacks

Callbacks::CALLBACKS

Instance Method Summary collapse

Methods included from MongoModel::DocumentExtensions::DynamicFinders

method_missing, respond_to?

Methods included from MongoModel::DocumentExtensions::Callbacks

#destroy_with_callbacks

Methods included from MongoModel::DocumentExtensions::Validations

#save, #save!

Methods included from MongoModel::DocumentExtensions::Scopes

#initialize

Methods included from MongoModel::DocumentExtensions::OptimisticLocking

#locking_enabled?

Methods included from MongoModel::DocumentExtensions::Persistence

#collection, #database, #delete, #destroy, #generate_id, #reload, #save, #save!, #update_attribute, #update_attributes, #update_attributes!

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

#==(other) ⇒ Object



8
9
10
# File 'lib/mongomodel/document.rb', line 8

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