Method: BSON::ObjectId#===

Defined in:
lib/bson/object_id.rb

#===(other) ⇒ true, false

Check case equality on the object id.

Examples:

Check case equality.

object_id === other

Parameters:

  • other (Object)

    The object to check against.

Returns:

  • (true, false)

    If the objects are equal in a case.

Since:

  • 2.0.0



59
60
61
62
63
# File 'lib/bson/object_id.rb', line 59

def ===(other)
  return to_str == other.to_str if other.respond_to?(:to_str)

  super
end