method
normalize_protocol
v6.0.0 -
Show latest stable
- Class:
ActionDispatch::Http::URL
normalize_protocol(protocol)private
No documentation available.
# File actionpack/lib/action_dispatch/http/url.rb, line 140
def normalize_protocol(protocol)
case protocol
when nil
"http://"
when false, "//"
"//"
when PROTOCOL_REGEXP
"#{$1}://"
else
raise ArgumentError, "Invalid :protocol option: #{protocol.inspect}"
end
end