U:RDoc::AnyMethod[iI"new:ETI" CGI::new;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"Create a new CGI instance.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"tag_maker;T; [o; ; [ I"LThis is the same as using the +options_hash+ form with the value { ;TI"K:tag_maker => tag_maker } Note that it is recommended to use the ;TI"K+options_hash+ form, since it also allows you specify the charset you ;TI"will accept.;To;;[I"options_hash;T; [o; ; [I"*A Hash that recognizes three options:;T@o; ; ;;[o;;[I":accept_charset;T; [o; ; [I"?specifies encoding of received query string. If omitted, ;TI"I@@accept_charset is used. If the encoding is not valid, a ;TI")CGI::InvalidEncoding will be raised.;T@o; ; [I":Example. Suppose @@accept_charset is "UTF-8";T@o; ; [I"when not specified:;T@o:RDoc::Markup::Verbatim; [I"5cgi=CGI.new # @accept_charset # => "UTF-8" ;T: @format0o; ; [I" when specified as "EUC-JP":;T@o;; [I" "EUC-JP") # => "EUC-JP" ;T;0o;;[I":tag_maker;T; [ o; ; [I"KString that specifies which version of the HTML generation methods to ;TI"Guse. If not specified, no HTML generation methods will be loaded.;T@o; ; [I"(The following values are supported:;T@o; ; ;;[ o;;[I" "html3";T; [o; ; [I" HTML 3.x;To;;[I" "html4";T; [o; ; [I" HTML 4.0;To;;[I""html4Tr";T; [o; ; [I"HTML 4.0 Transitional;To;;[I""html4Fr";T; [o; ; [I"HTML 4.0 with Framesets;To;;[I" "html5";T; [o; ; [I" HTML 5;T@o;;[I"#:max_multipart_length;T; [ o; ; [ I"MSpecifies maximum length of multipart data. Can be an Integer scalar or ;TI"Ga lambda, that will be evaluated when the request is parsed. This ;TI"Lallows more complex logic to be set when determining whether to accept ;TI"Fmultipart data (e.g. consult a registered users upload allowance);T@o; ; [I"'Default is 128 * 1024 * 1024 bytes;T@o;; [I"Ecgi=CGI.new(:max_multipart_length => 268435456) # simple scalar ;TI" ;TI"Jcgi=CGI.new(:max_multipart_length => -> {check_filesystem}) # lambda ;T;0o;;[I"block;T; [o; ; [I"BIf provided, the block is called when an invalid encoding is ;TI"encountered. For example:;T@o;; [ I"encoding_errors={} ;TI""EUC-JP") do |name,value| ;TI"% encoding_errors[name] = value ;TI" end ;T;0o; ; [ I"FFinally, if the CGI object is not created in a standard CGI call ;TI"Oenvironment (that is, it can't locate REQUEST_METHOD in its environment), ;TI"Pthen it will run in "offline" mode. In this mode, it reads its parameters ;TI"Nfrom the command line or (failing that) from standard input. Otherwise, ;TI"Mcookies and other parameters are parsed automatically from the standard ;TI"ACGI locations, which varies according to the REQUEST_METHOD.;T: @fileI"lib/cgi/core.rb;T:0@omit_headings_from_table_of_contents_below0I"GCGI.new(tag_maker) { block } CGI.new(options_hash = {}) { block } ;TI"name, value;F[I"(options = {});T@FI"CGI;TcRDoc::NormalClass00