Ruby 1.9.0 リファレンスマニュアル > ライブラリ一覧 > cgiライブラリ > CGIクラス

class CGI

クラスの継承リスト: CGI < CGI::QueryExtension < Object < Kernel < BasicObject

要約

特異メソッド

定義 説明
escape(string)

string を URL エンコードした文字列を新しく作成し返します。

escapeElement(string, *elements)

elements に指定したエレメントのタグだけを実体参照に置換します。

escapeHTML(string)

string 中の &"<> を実体参照にエンコードした文字列を新しく作成し返します。

parse(query)

QUERY_STRING をパースします。

pretty(string, shift = " ")

HTML を人間に見やすく整形します。

rfc1123_date(time)

時刻 time を [RFC1123] フォーマットに準拠した文字列に変換します。

unescape(string)

string を URL デコードした文字列を新しく作成し返します。

unescapeElement(string, *element)

特定の要素だけをHTMLエスケープから戻す。

unescapeHTML(string)

string 中の実体参照のうち、&amp; &gt; &lt; &quot; と数値指定がされているもの (&#0ffff など) だけを外します。

インスタンスメソッド

定義 説明
header(headers = "text/html")

HTTP ヘッダを headers に従って生成します。( CGI#out と違い、標準出力には出力しません) CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。 [ruby-list:35911]

out(options = "text/html") { .... }

HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

print(*strings)

引数の文字列を標準出力に出力します。

定数

定義 説明
CR
EOL
HTTP_STATUS
LF
NEEDS_BINMODE
PATH_SEPARATOR
REVISION
RFC822_DAYS
RFC822_MONTHS

継承したメソッド

! != [] accept accept_charset accept_encoding accept_language auth_type cache_control content_length content_type cookies from gateway_interface has_key? host keys multipart? negotiate params params= path_info path_translated pragma query_string raw_cookie raw_cookie2 referer remote_addr remote_host remote_ident remote_user request_method script_name server_name server_port server_protocol server_software user_agent == === =~ __id__ __send__ _dump class clone dclone display enum_for eql? equal? extend freeze frozen? hash initialize initialize_copy inspect instance_eval instance_exec instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? marshal_dump marshal_load method method_missing methods nil? pretty_inspect pretty_print pretty_print_cycle pretty_print_inspect pretty_print_instance_variables private_methods protected_methods public_methods remove_instance_variable respond_to? singleton_method_added singleton_method_removed singleton_method_undefined singleton_methods taint tainted? tap to_a to_ary to_hash to_int to_io to_proc to_regexp to_s to_splat to_str to_yaml to_yaml_properties to_yaml_style untaint .new