123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Equality::ClassMethods

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
Defined in: lib/mongoid/equality.rb

Instance Method Summary

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.

[ GitHub ]

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

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