method

normalize_protocol

rails latest stable - Class: ActionDispatch::Http::URL
normalize_protocol(protocol)
private

No documentation available.

# File actionpack/lib/action_dispatch/http/url.rb, line 133
          def normalize_protocol(protocol)
            case protocol
            when nil
              secure_protocol ? "https://" : "http://"
            when false, "//"
              "//"
            when PROTOCOL_REGEXP
              "#{$1}://"
            else
              raise ArgumentError, "Invalid :protocol option: #{protocol.inspect}"
            end
          end