Returns filter.
Setter for filter val
.
Returns extensions.
Setter for extensions val
.
Creates a new URI::MailTo
object from components, with syntax checking.
Components can be provided as an Array
or Hash
. If an Array
is used, the components must be supplied as [to, headers]
.
If a Hash
is used, the keys are the component names preceded by colons.
The headers can be supplied as a pre-encoded string, such as "subject=subscribe&cc=address"
, or as an Array
of Arrays like [['subject', 'subscribe'], ['cc', 'address']]
.
Examples:
require 'uri' m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby']) m1.to_s # => "mailto:joe@example.com?subject=Ruby" m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]]) m2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com" m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]}) m3.to_s # => "mailto:listman@example.com?subject=subscribe"
Creates a new URI::MailTo
object from generic URL components with no syntax checking.
This method is usually called from URI::parse
, which checks the validity of each component.
Setter for to v
.
Setter for headers v
.
URI::Parser.new([opts])
The constructor accepts a hash as options for parser. Keys of options are pattern names of URI
components and values of options are pattern strings. The constructor generates set of regexps for parsing URIs.
You can use the following keys:
* :ESCAPED (URI::PATTERN::ESCAPED in default) * :UNRESERVED (URI::PATTERN::UNRESERVED in default) * :DOMLABEL (URI::PATTERN::DOMLABEL in default) * :TOPLABEL (URI::PATTERN::TOPLABEL in default) * :HOSTNAME (URI::PATTERN::HOSTNAME in default)
p = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})") u = p.parse("http://example.jp/%uABCD") #=> #<URI::HTTP http://example.jp/%uABCD> URI.parse(u.to_s) #=> raises URI::InvalidURIError s = "http://example.com/ABCD" u1 = p.parse(s) #=> #<URI::HTTP http://example.com/ABCD> u2 = URI.parse(s) #=> #<URI::HTTP http://example.com/ABCD> u1 == u2 #=> true u1.eql?(u2) #=> false
Returns a split URI
against regexp[:ABS_URI]
.
uri
Parses uri
and constructs either matching URI
scheme object (File
, FTP
, HTTP
, HTTPS
, LDAP
, LDAPS
, or MailTo
) or URI::Generic
.
p = URI::Parser.new p.parse("ldap://ldap.example.com/dc=example?user=john") #=> #<URI::LDAP ldap://ldap.example.com/dc=example?user=john>
str
String
to search
schemes
Patterns to apply to str
Attempts to parse and merge a set of URIs. If no block
given, then returns the result, else it calls block
for each element in result.
See also URI::Parser.make_regexp
.
Constructs a safe String
from str
, removing unsafe characters, replacing them with codes.
Removes escapes from str
.
Creates a new URI::WS
object from components, with syntax checking.
The components accepted are userinfo, host, port, path, and query.
The components should be provided either as an Array
, or as a Hash
with keys formed by preceding the component names with a colon.
If an Array
is used, the components must be passed in the order [userinfo, host, port, path, query]
.
Example:
uri = URI::WS.build(host: 'www.example.com', path: '/foo/bar') uri = URI::WS.build([nil, "www.example.com", nil, "/path", "query"])
Currently, if passed userinfo components this method generates invalid WS
URIs as per RFC 1738.
Error raised by the DRbProtocol
module when it cannot find any protocol implementation support the scheme specified in a URI
.
Response class for URI Too Long
responses (status code 414).
The URI
provided was too long for the server to process. See 414 URI Too Long.
Response class for URI Too Long
responses (status code 414).
The URI
provided was too long for the server to process. See 414 URI Too Long.
Response class for URI Too Long
responses (status code 414).
The URI
provided was too long for the server to process. See 414 URI Too Long.
S3URISigner
implements AWS SigV4 for S3 Source to avoid a dependency on the aws-sdk-* gems More on AWS SigV4: docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
Keeps track of what elements are in the queue in priority and also ensures that when one element engulfs/covers/eats another that the larger element evicts the smaller element
Holds elements in a priority heap on insert
Instead of constantly calling ‘sort!`, put the element where it belongs the first time around
Example:
queue = PriorityQueue.new queue << 33 queue << 44 queue << 1 puts queue.peek # => 44