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

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Print an HTTP header and body to $DEFAULT_OUTPUT ($&gt;)
- !ruby/struct:SM::Flow::P 
  body: "The header is provided by <tt>options</tt>, as for #header(). The body of the document is that returned by the passed- in block. This block takes no arguments. It is required."
- !ruby/struct:SM::Flow::VERB 
  body: "  cgi = CGI.new\n  cgi.out{ &quot;string&quot; }\n    # Content-Type: text/html\n    # Content-Length: 6\n    #\n    # string\n\n  cgi.out(&quot;text/plain&quot;) { &quot;string&quot; }\n    # Content-Type: text/plain\n    # Content-Length: 6\n    #\n    # string\n\n  cgi.out(&quot;nph&quot;        =&gt; true,\n          &quot;status&quot;     =&gt; &quot;OK&quot;,  # == &quot;200 OK&quot;\n          &quot;server&quot;     =&gt; ENV['SERVER_SOFTWARE'],\n          &quot;connection&quot; =&gt; &quot;close&quot;,\n          &quot;type&quot;       =&gt; &quot;text/html&quot;,\n          &quot;charset&quot;    =&gt; &quot;iso-2022-jp&quot;,\n            # Content-Type: text/html; charset=iso-2022-jp\n          &quot;language&quot;   =&gt; &quot;ja&quot;,\n          &quot;expires&quot;    =&gt; Time.now + (3600 * 24 * 30),\n          &quot;cookie&quot;     =&gt; [cookie1, cookie2],\n          &quot;my_header1&quot; =&gt; &quot;my_value&quot;,\n          &quot;my_header2&quot; =&gt; &quot;my_value&quot;) { &quot;string&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: Content-Length is automatically calculated from the size of the String returned by the content block.
- !ruby/struct:SM::Flow::P 
  body: If ENV['REQUEST_METHOD'] == &quot;HEAD&quot;, then only the header is outputted (the content block is still required, but it is ignored).
- !ruby/struct:SM::Flow::P 
  body: If the charset is &quot;iso-2022-jp&quot; or &quot;euc-jp&quot; or &quot;shift_jis&quot; then the content is converted to this charset, and the language is set to &quot;ja&quot;.
full_name: CGI#out
is_singleton: false
name: out
params: (options = "text/html") {|| ...}
visibility: public
