D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
URI
/
File
/
Filename :
build-c.ri
back
Copy
U:RDoc::AnyMethod[iI" build:ETI"URI::File::build;TT:publico:RDoc::Markup::Document:@parts[S:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph; [I"JCreates a new URI::File object from components, with syntax checking.;T@ o;; [I"3The components accepted are +host+ and +path+.;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>[host, path]</code>.;T@ o;; [I">A path from e.g. the File class should be escaped before ;TI"being passed.;T@ o;; [I"Examples:;T@ o:RDoc::Markup::Verbatim; [I"require 'uri' ;TI" ;TI"Duri1 = URI::File.build(['host.example.com', '/path/file.zip']) ;TI"=uri1.to_s # => "file://host.example.com/path/file.zip" ;TI" ;TI":uri2 = URI::File.build({:host => 'host.example.com', ;TI" :path => '/ruby/src'}) ;TI"8uri2.to_s # => "file://host.example.com/ruby/src" ;TI" ;TI"Iuri3 = URI::File.build({:path => URI::escape('/path/my file.txt')}) ;TI"1uri3.to_s # => "file:///path/my%20file.txt";T:@format0: @fileI"lib/uri/file.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(args);T@0TI" File;TcRDoc::NormalClass00