path

path() Instance Public methods Returns the path from an FTP URI. RFC 1738 specifically states that the path for an FTP URI does not include the / which separates the URI path from the URI host. Example: ftp://ftp.example.com/pub/ruby The above URI indicates that the client should connect to ftp.example.com then cd pub/ruby from the initial login directory. If you want to cd to an absolute directory, you must include an escaped / (%2F) in the path. Example: ftp://ftp.example.com/%2

to_s

to_s() Instance Public 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>

set_path

set_path(v) Instance Protected methods

set_typecode

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

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.

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.

component

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

default_port

default_port() Class Public methods Returns default port

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