Module: Mongoid::Equality::ClassMethods

Defined in:
lib/mongoid/equality.rb

Instance Method Summary collapse

Instance Method Details

#===(other) ⇒ true | false

Performs class equality checking.

Examples:

Compare the classes.

document === other

Parameters:

  • other (Document | Object)

    The other object to compare with.

Returns:

  • (true | false)

    True if the classes are equal, false if not.



59
60
61
# File 'lib/mongoid/equality.rb', line 59

def ===(other)
  other.is_a?(self)
end