class Gem::URI::File
def self.build(args)
uri3.to_s # => "file:///path/my%20file.txt"
uri3 = Gem::URI::File.build({:path => Gem::URI::escape('/path/my file.txt')})
uri2.to_s # => "file://host.example.com/ruby/src"
:path => '/ruby/src'})
uri2 = Gem::URI::File.build({:host => 'host.example.com',
uri1.to_s # => "file://host.example.com/path/file.zip"
uri1 = Gem::URI::File.build(['host.example.com', '/path/file.zip'])
require 'rubygems/vendor/uri/lib/uri'
Examples:
being passed.
A path from e.g. the File class should be escaped before
order
[host, path]
.If an Array is used, the components must be passed in the
with keys formed by preceding the component names with a colon.
The components should be provided either as an Array, or as a Hash
The components accepted are +host+ and +path+.
Creates a new Gem::URI::File object from components, with syntax checking.
== Description
def self.build(args) tmp = Util::make_components_hash(self, args) super(tmp) end