set_fragment

set_fragment(v) Instance Protected methods protected setter for the fragment component v see also #fragment=

component_ary

component_ary() Instance Protected methods returns an Array of the components defined from the COMPONENT Array

userinfo=

userinfo=(userinfo) Instance Public methods Sets userinfo, argument is string like 'name:pass'

userinfo

userinfo() Instance Public methods returns the userinfo, either as 'user' or 'user:password'

user=

user=(user) Instance Public methods Args v String Description public setter for the user component. (with validation) see also URI::Generic.check_user Usage require 'uri' uri = URI.parse("http://john:S3nsit1ve@my.example.com") uri.user = "sam" # => "sam" uri #=> #<URI::HTTP:0x00000000881d90 URL:http://sam:V3ry_S3nsit1ve@my.example.com>

user

user() Instance Public methods returns the user component

to_s

to_s() Instance Public methods Constructs String from URI

select

select(*components) Instance Public methods Args components Multiple Symbol arguments defined in URI::HTTP Description Selects specified components from URI Usage require 'uri' uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') p uri.select(:userinfo, :host, :path) # => ["myuser:mypass", "my.example.com", "/test.rbx"]

scheme=

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

route_to

route_to(oth) Instance Public methods Args oth URI or String Description Calculates relative path to oth from self Usage require 'uri' uri = URI.parse('http://my.example.com') p uri.route_to('http://my.example.com/main.rbx?page=1') #=> #<URI::Generic:0x2020c2f6 URL:/main.rbx?page=1>