normalize!

normalize!() Instance Public methods Destructive version of normalize

normalize

normalize() Instance Public methods Returns normalized URI

merge!

merge!(oth) Instance Public methods Args oth URI or String Description Destructive form of merge Usage require 'uri' uri = URI.parse("http://my.example.com") uri.merge!("/main.rbx?page=1") p uri # => #<URI::HTTP:0x2021f3b0 URL:http://my.example.com/main.rbx?page=1>

merge

merge(oth) Instance Public methods Args oth URI or String Description Merges two URI's. Usage require 'uri' uri = URI.parse("http://my.example.com") p uri.merge("/main.rbx?page=1") # => #<URI::HTTP:0x2021f3b0 URL:http://my.example.com/main.rbx?page=1> +

inspect

inspect() Instance Public methods

hostname=

hostname=(v) Instance Public methods set the host part of the URI as the argument with brackets for IPv6 addresses. This method is same as #host= except the argument can be bare IPv6 address. u = URI(âfoo/barâ) p u.to_s #=> âfoo/barâ u.hostname = â::1â p u.to_s #=> â[::1]/barâ If the arugument seems IPv6 address, it is wrapped by brackets.

hostname

hostname() Instance Public methods extract the host part of the URI and unwrap brackets for IPv6 addresses. This method is same as #host except brackets for IPv6 (andn future IP) addresses are removed. u = URI(âhttp://[::1]/barâ) p u.hostname #=> â::1â p u.host #=> â[::1]â

host=

host=(v) Instance Public methods Args v String Description public setter for the host component v. (with validation) see also URI::Generic.check_host Usage require 'uri' uri = URI.parse("http://my.example.com") uri.host = "foo.com" # => "foo.com" uri #=> #<URI::HTTP:0x000000008e89e8 URL:http://foo.com>

hierarchical?

hierarchical?() Instance Public methods Checks if URI has a path

hash

hash() Instance Public methods