Module: MongoODM::Document::Equality::InstanceMethods

Defined in:
lib/mongo_odm/document/equality.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) eql?(other) Also known as: ==



9
10
11
# File 'lib/mongo_odm/document/equality.rb', line 9

def eql?(other)
  other.is_a?(self.class) && _id == other._id && attributes == other.attributes
end

- (Object) hash



14
15
16
# File 'lib/mongo_odm/document/equality.rb', line 14

def hash
  _id.hash
end