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