check_opaque(v)
private
Show source
def check_opaque(v)
return v unless v
if @host || @port || @user || @path
raise InvalidURIError,
"can not set opaque with host, port, userinfo or path"
elsif v && parser.regexp[:OPAQUE] !~ v
raise InvalidComponentError,
"bad component(expected opaque component): #{v}"
end
return true
end