lib/mongo/mongo.rb
# Turns an array containing a host name string and a
# port number integer into a [host, port] pair array.
Turns an array containing a host name string and a
port number integer into a [host, port] pair array.
Turns an array containing a host name string and a port number integer into a [ host port ] pair array .
def pair_val_to_connection(a)
          case a
          when nil
            ['localhost', DEFAULT_PORT]
          when String
            [a, DEFAULT_PORT]
          when Integer
            ['localhost', a]
          when Array
            a
          end
        end
def pair_val_to_connection ( a ) case a when nil [ 'localhost' , DEFAULT_PORT ] when String [ a , DEFAULT_PORT ] when Integer [ 'localhost' , a ] when Array a end end
Turns an array containing a host name string and a
port number integer into a [host, port] pair array.
Turns an array containing a host name string and a port number integer into a [ host port ] pair array .
a
<not_specific>