def initialize(string, options = {})
@string = string
@options = options
parsed_scheme, _, remaining = string.partition(SCHEME_DELIM)
raise_invalid_error!(INVALID_SCHEME) unless parsed_scheme == scheme
parse!(remaining)
unless @uri_options[:ssl].nil? || @uri_options[:ssl].empty?
unless @uri_options[:ssl].uniq.length == 1
raise_invalid_error_no_fmt!("all instances of 'tls' and 'ssl' must have the same value")
end
@uri_options[:ssl] = @uri_options[:ssl].first
end
unless @uri_options[:ssl_verify].nil?
unless @uri_options[:ssl_verify_certificate].nil?
raise_invalid_error_no_fmt!("'tlsInsecure' and 'tlsAllowInvalidCertificates' cannot both be specified")
end
unless @uri_options[:ssl_verify_hostname].nil?
raise_invalid_error_no_fmt!("tlsInsecure' and 'tlsAllowInvalidHostnames' cannot both be specified")
end
end
end