decode_www_form

decode_www_form(str, enc=Encoding::UTF_8) Class Public methods Decode URL-encoded form data from given str. This decodes application/x-www-form-urlencoded data and returns array of key-value array. This internally uses ::decode_www_form_component. charset hack is not supported now because the mapping from given charset to Ruby's encoding is not clear yet. see also www.w3.org/TR/html5/syntax.html#character-encodings-0 This refers www.w3.org/TR/html5/forms.html#url-encoded-form-data

unescape

unescape( str )unescape( str, unsafe ) Instance Public methods Args str String to remove escapes from unsafe Regexp to apply. Defaults to self.regexp Description Removes escapes from str

split

split(uri) Instance Public methods Returns a split URI against regexp

parse

parse(uri) Instance Public methods Args uri String Description parses uri and constructs either matching URI scheme object (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:0x00000000b9e7e8 URL:ldap://ldap.example.com/dc=example?user=john>

make_regexp

make_regexp(schemes = nil) Instance Public methods returns Regexp that is default self.regexp, unless schemes is provided. Then it is a Regexp.union with self.pattern

join

join(*uris) Instance Public methods Args uris an Array of Strings Description Attempts to parse and merge a set of URIs

inspect

inspect() Instance Public methods

extract

extract( str )extract( str, schemes )extract( str, schemes ) {|item| block } Instance Public methods Args str String to search schemes Patterns to apply to str Description 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 #make_regexp

escape

escape( str )escape( str, unsafe ) Instance Public methods Args str String to make safe unsafe Regexp to apply. Defaults to self.regexp Description constructs a safe String from str, removing unsafe characters, replacing them with codes.

new

new(opts = {}) Class Public methods Synopsis URI::Parser.new([opts]) Args 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 generetes 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