def options
      options_string, options = match[10], { database: database }
      unless options_string.nil?
        options_string.split(/\&/).each do |option_string|
          key, value = option_string.split(/=/)
          if WRITE_OPTIONS.include?(key)
            options[:write] = { key.to_sym => cast(value) }
          elsif read = READ_MAPPINGS[value.downcase]
            options[:read] = read
          else
            options[key.to_sym] = cast(value)
          end
        end
      end
      options
    end
def options
      options_string, options = match[10], { database: database }
      unless options_string.nil?
        options_string.split(/\&/).each do |option_string|
          key, value = option_string.split(/=/)
          if WRITE_OPTIONS.include?(key)
            options[:write] = { key.to_sym => cast(value) }
          elsif read = READ_MAPPINGS[value.downcase]
            options[:read] = read
          else
            options[key.to_sym] = cast(value)
          end
        end
      end
      options
    end
Get the options provided in the URI.

 @example Get the options
   uri.options

 @note The options provided in the URI string must match the MongoDB
   specification.

 @return [ Hash ] Options hash usable by Moped

 @see http://docs.mongodb.org/manual/reference/connection-string/#connections-connection-options

 @since 1.3.0