lib/mongo/uri/options_mapper.rb
def convert_integer(name, value)
        unless /\A\d+\z/ =~ value
          log_warn("#{value} is not a valid integer for #{name}")
          return nil
        end

        value.to_i
      end
# Converts +value+ into an integer.
#
# If the value is not a valid integer, warns and returns nil.
#
# @param [ String ] name Name of the URI option being processed.
# @param value [ String ] URI option value.
#
# @return [ nil | Integer ] Converted value.
Converts +value+ into an integer.
If the value is not a valid integer, warns and returns nil.
Converts + value + into an integer . If the value is not a valid integer warns and returns nil .
def convert_integer(name, value)
        unless /\A\d+\z/ =~ value
          log_warn("#{value} is not a valid integer for #{name}")
          return nil
        end
        value.to_i
      end
def convert_integer ( name , value ) unless / \A \d + \z / =~ value log_warn ( "#{value} is not a valid integer for #{name}" ) return nil end value . to_i end
Converts +value+ into an integer.
Converts + value + into an integer .
None
 nil | Integer 
name
value
URI option value.
URI option value .
name Name of the URI option being processed.
name Name of the URI option being processed .