End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
URI.split
split(uri)
lib/uri/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/uri/common.rb, line 133
def self.split(uri)
RFC3986_PARSER.split(uri)
end
Synopsis
Example
URI::split(uri)
Args
Description
Splits the string on following parts and returns array with result:
-
Scheme
-
Userinfo
-
Host
-
Port
-
Registry
-
Path
-
Opaque
-
Query
-
Fragment
Usage
Example
require 'uri' URI.split("http://www.ruby-lang.org/") # => ["http", nil, "www.ruby-lang.org", nil, nil, "/", nil, nil, nil]