+

+(oth) Instance Public methods Alias for: merge

use_registry

use_registry() Class Public methods Returns whether a registry of naming authorities are being used.

new

new(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = DEFAULT_PARSER, arg_check = false) Class Public methods Args scheme Protocol scheme, i.e. 'http','ftp','mailto' and so on. userinfo User name and password, i.e. 'sdmitry:bla' host Server host name port Server port registry Registry of naming authorities. path Path on server opaque Opaque part query Query data fragment A part of URI after '#' sign parser Parser fo

default_port

default_port() Class Public methods Returns default port

component

component() Class Public methods Components of the URI in the order.

build2

build2(args) Class Public methods Synopsis See new Description At first, tries to create a new URI::Generic instance using ::build. But, if exception URI::InvalidComponentError is raised, then it URI::Escape#escape all URI components and tries again.

build

build(args) Class Public methods Synopsis See new Description Creates a new URI::Generic instance from components of URI::Generic with check. Components are: scheme, userinfo, host, port, registry, path, opaque, query and fragment. You can provide arguments either by an Array or a Hash. See new for hash keys to use or for order of array items.

set_typecode

set_typecode(v) Instance Protected methods private setter for the typecode v see also #typecode=

set_path

set_path(v) Instance Protected methods

typecode=

typecode=(typecode) Instance Public methods Args v String Description public setter for the typecode v. (with validation) see also URI::FTP.check_typecode Usage require 'uri' uri = URI.parse("ftp://john@ftp.example.com/my_file.img") #=> #<URI::FTP:0x00000000923650 URL:ftp://john@ftp.example.com/my_file.img> uri.typecode = "i" # => "i" uri #=> #<URI::FTP:0x00000000923650 URL:ftp://john@ftp.example.com/my_file.img;type=i>