--- !ruby/object:RDoc::RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:RDoc::Markup::Flow::H 
  :level: 2
  :text: Synopsis
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  URI::Parser.new([opts])\n"
- !ruby/struct:RDoc::Markup::Flow::H 
  :level: 2
  :text: Args
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: 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.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "You can use the following keys:"
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  * <tt>:ESCAPED</tt> (URI::PATTERN::ESCAPED in default)\n  * <tt>:UNRESERVED</tt> (URI::PATTERN::UNRESERVED in default)\n  * <tt>:DOMLABEL</tt> (URI::PATTERN::DOMLABEL in default)\n  * <tt>:TOPLABEL</tt> (URI::PATTERN::TOPLABEL in default)\n  * <tt>:HOSTNAME</tt> (URI::PATTERN::HOSTNAME in default)\n"
- !ruby/struct:RDoc::Markup::Flow::H 
  :level: 2
  :text: Examples
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  p = URI::Parser.new(:ESCPAED =&gt; &quot;(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})&quot;\n  u = p.parse(&quot;http://example.jp/%uABCD&quot;) #=&gt; #&lt;URI::HTTP:0xb78cf4f8 URL:http://example.jp/%uABCD&gt;\n  URI.parse(u.to_s) #=&gt; raises URI::InvalidURIError\n\n  s = &quot;http://examle.com/ABCD&quot;\n  u1 = p.parse(s) #=&gt; #&lt;URI::HTTP:0xb78c3220 URL:http://example.com/ABCD&gt;\n  u2 = URI.parse(s) #=&gt; #&lt;URI::HTTP:0xb78b6d54 URL:http://example.com/ABCD&gt;\n  u1 == u2 #=&gt; true\n  u1.eql?(u2) #=&gt; false\n"
full_name: URI::Parser::new
is_singleton: true
name: new
params: (opts = {})
visibility: public
