@@ -123,18 +123,21 @@ def initialize(host=nil, port=nil, options={})
123123 connect if should_connect
124124 end
125125
126- # Initialize a paired connection to MongoDB.
126+ # Initialize a connection to a MongoDB replica set using an array of seed nodes .
127127 #
128- # @param nodes [Array] An array of arrays, each of which specified a host and port.
128+ # Note that, even when connecting to a replica set, you can use Connection.new specifying
129+ # just a single node. If the replica set is up, the remaining nodes in the set will be cached
130+ # for failover.
131+ #
132+ # @param nodes [Array] An array of arrays, each of which specifies a host and port.
129133 # @param opts Takes the same options as Connection.new
130134 #
131135 # @example
132- # Connection.paired ([["db1.example.com", 27017],
136+ # Connection.multi ([["db1.example.com", 27017],
133137 # ["db2.example.com", 27017]])
134138 #
135139 # @example
136- # Connection.paired([["db1.example.com", 27017],
137- # ["db2.example.com", 27017]],
140+ # Connection.multi([["db1.example.com", 27017], ["db2.example.com", 27017], ["db3.example.com", 27017]],
138141 # :pool_size => 20, :timeout => 5)
139142 #
140143 # @return [Mongo::Connection]
0 commit comments