Module: MongoODM::Document::Equality::InstanceMethods
- Defined in:
- lib/mongo_odm/document/equality.rb
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
Instance Method Details
#eql?(other) ⇒ Boolean 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 |
#hash ⇒ Object
14 15 16 |
# File 'lib/mongo_odm/document/equality.rb', line 14 def hash _id.hash end |