Method: Addressable::URI#normalized_scheme
- Defined in:
- lib/addressable/uri.rb
#normalized_scheme ⇒ String
The scheme component for this URI, normalized.
896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 |
# File 'lib/addressable/uri.rb', line 896 def normalized_scheme return nil unless self.scheme if @normalized_scheme == NONE @normalized_scheme = if self.scheme =~ /^\s*ssh\+svn\s*$/i "svn+ssh".dup else Addressable::URI.normalize_component( self.scheme.strip.downcase, Addressable::URI::NormalizeCharacterClasses::SCHEME ) end end # All normalized values should be UTF-8 force_utf8_encoding_if_needed(@normalized_scheme) @normalized_scheme end |