Method: Mongo::Cluster#==

Defined in:
lib/mongo/cluster.rb

#==(other) ⇒ true, false

Determine if this cluster of servers is equal to another object. Checks the servers currently in the cluster, not what was configured.

Examples:

Is the cluster equal to the object?

cluster == other

Parameters:

  • other (Object)

    The object to compare to.

Returns:

  • (true, false)

    If the objects are equal.

Since:

  • 2.0.0



743
744
745
746
# File 'lib/mongo/cluster.rb', line 743

def ==(other)
  return false unless other.is_a?(Cluster)
  addresses == other.addresses && options == other.options
end