Method: URI.split

Defined in:
lib/uri/common.rb

.split(uri) ⇒ Object

Synopsis

URI::split(uri)

Args

uri

String with URI.

Description

Splits the string on following parts and returns array with result:

* Scheme
* Userinfo
* Host
* Port
* Registry
* Path
* Opaque
* Query
* Fragment

Usage

require 'uri'

p URI.split("http://www.ruby-lang.org/")
# => ["http", nil, "www.ruby-lang.org", nil, nil, "/", nil, nil, nil]


711
712
713
# File 'lib/uri/common.rb', line 711

def self.split(uri)
  DEFAULT_PARSER.split(uri)
end