Method: Mongo::Operation::Specifiable#==

Defined in:
lib/mongo/operation/shared/specifiable.rb

#==(other) ⇒ true, false Also known as: eql?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Check equality of two specifiable operations.

Examples:

Are the operations equal?

operation == other

Parameters:

  • other (Object)

    The other operation.

Returns:

  • (true, false)

    Whether the objects are equal.

Since:

  • 2.0.0



161
162
163
164
# File 'lib/mongo/operation/shared/specifiable.rb', line 161

def ==(other)
  return false unless other.is_a?(Specifiable)
  spec == other.spec
end