123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Cluster::Topology::NoReplicaSetOptions

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/mongo/cluster/topology/no_replica_set_options.rb

Overview

Since:

  • 2.0.0

Instance Method Summary

Instance Method Details

#validate_options(options, cluster) (private)

Since:

  • 2.0.0

[ GitHub ]

  
# File 'lib/mongo/cluster/topology/no_replica_set_options.rb', line 24

def validate_options(options, cluster)
  # These options can be set to nil for convenience, but not to
  # any value including an empty string.
  [:replica_set_name, :max_election_id, :max_set_version].each do |option|
    if options[option]
      raise ArgumentError, "Topology #{self.class.name} cannot have the :#{option} option set"
    end
  end
  super(options, cluster)
end