Results for: "Pathname"

No documentation available

Returns the parser to be used.

Unless a URI::Parser is defined, DEFAULT_PARSER is used.

Args

v

String

Description

Public setter for the scheme component v (with validation).

See also URI::Generic.check_scheme.

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.scheme = "https"
uri.to_s  #=> "https://my.example.com"

Args

v

String

Description

Public setter for the password component (with validation).

See also URI::Generic.check_password.

Usage

require 'uri'

uri = URI.parse("http://john:S3nsit1ve@my.example.com")
uri.password = "V3ry_S3nsit1ve"
uri.to_s  #=> "http://john:V3ry_S3nsit1ve@my.example.com"

Returns the password component.

Args

v

String

Description

Public setter for the opaque component v (with validation).

See also URI::Generic.check_opaque.

Checks the fragment v component against the URI::Parser Regexp for :FRAGMENT.

Args

v

String

Description

Public setter for the fragment component v (with validation).

Usage

require 'uri'

uri = URI.parse("http://my.example.com/?id=25#time=1305212049")
uri.fragment = "time=1305212086"
uri.to_s  #=> "http://my.example.com/?id=25#time=1305212086"

Returns true if URI does not have a scheme (e.g. http:// or https://) specified.

Args

oth

URI or String

Description

Destructive form of merge.

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.merge!("/main.rbx?page=1")
uri.to_s  # => "http://my.example.com/main.rbx?page=1"

Args

oth

URI or String

Description

Merges two URIs.

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.merge("/main.rbx?page=1")
# => "http://my.example.com/main.rbx?page=1"

Returns attributes.

Setter for attributes val.

Args

uri

String

Description

Parses uri and constructs either matching URI scheme object (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic.

Usage

p = URI::Parser.new
p.parse("ldap://ldap.example.com/dc=example?user=john")
#=> #<URI::LDAP ldap://ldap.example.com/dc=example?user=john>

Args

uri

String

Description

Parses uri and constructs either matching URI scheme object (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic.

Usage

p = URI::Parser.new
p.parse("ldap://ldap.example.com/dc=example?user=john")
#=> #<URI::LDAP ldap://ldap.example.com/dc=example?user=john>

Parses a Cookie field sent from the user-agent. Returns an array of cookies.

Parses a request from socket. This is called internally by WEBrick::HTTPServer.

for IO.copy_stream. Note: we may return a larger string than size here; but IO.copy_stream does not care.

Sets the response’s status to the status code

Shortcut for logging a FATAL message

Will the logger output FATAL messages?

Formats arg for the logger

Updates the database with multiple values from the specified object. Takes any object which implements the each_pair method, including Hash and DBM objects.

Returns self.

Returns true if stat terminated because of an uncaught signal.

Returns the least significant eight bits of the return code of stat. Only available if exited? is true.

fork { }           #=> 26572
Process.wait       #=> 26572
$?.exited?         #=> true
$?.exitstatus      #=> 0

fork { exit 99 }   #=> 26573
Process.wait       #=> 26573
$?.exited?         #=> true
$?.exitstatus      #=> 99

Returns the replacement string.

ec = Encoding::Converter.new("euc-jp", "us-ascii")
p ec.replacement    #=> "?"

ec = Encoding::Converter.new("euc-jp", "utf-8")
p ec.replacement    #=> "\uFFFD"
Search took: 5ms  ·  Total Results: 2732