D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
URI
/
FTP
/
Filename :
build-c.ri
back
Copy
U:RDoc::AnyMethod[iI" build:ETI"URI::FTP::build;TT:publico:RDoc::Markup::Document:@parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph; [I"ICreates a new URI::FTP object from components, with syntax checking.;T@ o;; [I"IThe components accepted are +userinfo+, +host+, +port+, +path+, and ;TI"+typecode+.;T@ o;; [I"HThe components should be provided either as an Array, or as a Hash ;TI"Dwith keys formed by preceding the component names with a colon.;T@ o;; [I"?If an Array is used, the components must be passed in the ;TI"?order <code>[userinfo, host, port, path, typecode]</code>.;T@ o;; [I"FIf the path supplied is absolute, it will be escaped in order to ;TI"!make it absolute in the URI.;T@ o;; [I"Examples:;T@ o:RDoc::Markup::Verbatim; [I"require 'uri' ;TI" ;TI"Euri1 = URI::FTP.build(['user:password', 'ftp.example.com', nil, ;TI" '/path/file.zip', 'i']) ;TI"Suri1.to_s # => "ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i" ;TI" ;TI"8uri2 = URI::FTP.build({:host => 'ftp.example.com', ;TI" :path => 'ruby/src'}) ;TI"5uri2.to_s # => "ftp://ftp.example.com/ruby/src";T:@format0: @fileI"lib/uri/ftp.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(args);T@/TI"FTP;TcRDoc::NormalClass00