Results for: "match"

Protected setter for the scheme component v.

See also URI::Generic.scheme=.

Checks the user and password.

If password is not provided, then user is split, using URI::Generic.split_userinfo, to pull user and +password.

See also URI::Generic.check_user, URI::Generic.check_password.

Checks the user v component for RFC2396 compliance and against the URI::Parser Regexp for :USERINFO.

Can not have a registry or opaque component defined, with a user component defined.

Checks the password v component for RFC2396 compliance and against the URI::Parser Regexp for :USERINFO.

Can not have a registry or opaque component defined, with a user component defined.

Checks the host v component for RFC2396 compliance and against the URI::Parser Regexp for :HOST.

Can not have a registry or opaque component defined, with a host component defined.

Checks the port v component for RFC2396 compliance and against the URI::Parser Regexp for :PORT.

Can not have a registry or opaque component defined, with a port component defined.

Protected setter for the path component v.

See also URI::Generic.path=.

Checks the opaque v component for RFC2396 compliance and against the URI::Parser Regexp for :OPAQUE.

Can not have a host, port, user, or path component defined, with an opaque component defined.

Returns an Array of the path split on ‘/’.

Merges a base path base, with relative path rel, returns a modified base path.

Private setter for attributes val.

Checks the to v component.

Checks the headers v component against either

Returns the RFC822 e-mail text equivalent of the URL, as a String.

Example:

require 'uri'

uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr")
uri.to_mailtext
# => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n"

Returns Regexp that is default self.regexp[:ABS_URI_REF], unless schemes is provided. Then it is a Regexp.union with self.pattern[:X_ABS_URI].

Constructs the default Hash of patterns.

Returns Regexp that is default self.regexp[:ABS_URI_REF], unless schemes is provided. Then it is a Regexp.union with self.pattern[:X_ABS_URI].

Constructs the default Hash of patterns.

Returns an array containing the values associated with the given keys.

Calls the given block once for each key, value pair in the database.

Returns self.

Calls the given block for each value in database.

Returns self.

Returns the destination encoding as an encoding object.

Returns the one-character string which cause Encoding::UndefinedConversionError.

ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP")
begin
  ec.convert("\xa0")
rescue Encoding::UndefinedConversionError
  puts $!.error_char.dump   #=> "\xC2\xA0"
  p $!.error_char.encoding  #=> #<Encoding:UTF-8>
end

Returns the destination encoding as an encoding object.

Returns the corresponding ASCII compatible encoding.

Returns nil if the argument is an ASCII compatible encoding.

“corresponding ASCII compatible encoding” is an ASCII compatible encoding which can represents exactly the same characters as the given ASCII incompatible encoding. So, no conversion undefined error occurs when converting between the two encodings.

Encoding::Converter.asciicompat_encoding("ISO-2022-JP") #=> #<Encoding:stateless-ISO-2022-JP>
Encoding::Converter.asciicompat_encoding("UTF-16BE") #=> #<Encoding:UTF-8>
Encoding::Converter.asciicompat_encoding("UTF-8") #=> nil
Search took: 6ms  ·  Total Results: 2422