naive_bayes/resources/ruby/cluster.rb
# Add a server to the cluster with the provided address. Useful in
# auto-discovery of new servers when an existing server executes an ismaster
# and potentially non-configured servers were included.
#
# @example Add the server for the address to the cluster.
#   cluster.add('127.0.0.1:27018')
#
# @param [ String ] address The address of the server to add.
#
# @return [ Server ] The newly added server, if not present already.
#
# @since 3.0.0
Add a server to the cluster with the provided address. Useful in
auto-discovery of new servers when an existing server executes an ismaster
and potentially non-configured servers were included.
Add a server to the cluster with the provided address . Useful in auto - discovery of new servers when an existing server executes an ismaster and potentially non - configured servers were included .
def add(address)
      unless addresses.include?(address)
        server = Server.new(address, options)
        addresses.push(address)
        @servers.push(server)
        server
      end
    end
def add ( address ) unless addresses . include? ( address ) server = Server . new ( address , options ) addresses . push ( address ) @servers . push ( server ) server end end
Add a server to the cluster with the provided address.
Add a server to the cluster with the provided address .
The newly added server, if not present already.
The newly added server if not present already .
 Server 
address
<not_specific>
<not_specific>
address The address of the server to add.
address The address of the server to add .
example
Add the server for the address to the cluster.
Add the server for the address to the cluster .
since
None