88件ヒット
[1-88件を表示]
(0.108秒)
種類
- インスタンスメソッド (44)
- ライブラリ (33)
- 文書 (11)
クラス
- CGI (22)
-
URI
:: Generic (22)
キーワード
- Ruby用語集 (11)
- cgi (11)
-
cgi
/ session (11) - header (11)
-
rdoc
/ generator / json _ index (11) -
route
_ from (11) -
route
_ to (11)
検索結果
先頭5件
-
CGI
# out(options = "text / html") { . . . . } (21338.0) -
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
...t が "iso-2022-jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エンコーディングを自動変換し、language を "ja"にします。
@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。
例:
cgi = CGI.new......cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string
cgi.out("text/plain"){ "string" }
# Content-Type: text/plain
# Content-Length: 6
#
# string
cgi.out({"nph" => t......"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30... -
URI
:: Generic # route _ to(dst) -> URI :: Generic (9212.0) -
自身から dst への相対パスを返します。
...自身から dst への相対パスを返します。
@param dst URI を文字列かURIオブジェクトで与えます。
例:
require 'uri'
p URI.parse('http://example.com/').route_to('http://example.com/foo/bar.html')
#=> #<URI::Generic:0x20100198 URL:foo/bar.html>... -
URI
:: Generic # route _ from(src) -> URI :: Generic (6212.0) -
与えられた URI を表す src からの相対パスを返します。
...れた URI を表す src からの相対パスを返します。
@param src 自身の相対パスを算出するための、ルートとなる Absolute URI を与えます。
例:
require 'uri'
p URI.parse('http://example.com/foo/bar.html') - 'http://example.com/'
#=> #<URI::Generic:0x201002......56 URL:foo/bar.html>... -
cgi (6198.0)
-
CGI プログラムの支援ライブラリです。
...CGI プログラムの支援ライブラリです。
CGI プロトコルの詳細については以下の文書を参照してください。
* https://tools.ietf.org/html/draft-coar-cgi-v11-03
* 3875: The Common Gateway Interface (CGI) Version 1.1
* https://www.w3.org/CGI/
=== 使用例
=......ist[][ruby]{
require "cgi"
cgi = CGI.new
values = cgi['field_name'] # <== 'field_name' の配列
# 'field_name' が指定されていなかったら、 ""を返す。
fields = cgi.keys # <== field nameの配列
# フォームに 'field_name' というfield nameがあるときに真
cgi......riginal_filename # 元の名前
value.content_type # content_type
//}
==== クライアントにクッキーを渡す
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
for name, cookie in cgi.cookies
cookie.expires = Time.now + 30
end
cgi.out("cookie" => cgi.cookie... -
cgi
/ session (6138.0) -
CGI のセッション管理を行うライブラリ。
...CGI のセッション管理を行うライブラリ。
セッションとは、HTTP の一連のリクエストとレスポンスが属するべき
コンテクスト (状況) のことをいいます。
セッション管理には従来通り cgi ライブラリが提供する
クッキーを使......を得る)
name = session['name']
別な CGI でこのセッション情報を取り出すときは、このようにします。
=== 使い方 (ヘッダ出力)
ヘッダ出力は CGI#out、CGI#header を使っている限り
通常通りで構いません。
cgi/session は内部的にクッ......合は CGI::Session オブジェクト生成前に umask 値を設定してください。
セッション情報ファイルは 0600 で作成されるようになりました。
=== CGI::HtmlExtension#form の出力
CGI::Session.new 後の CGI::HtmlExtension#form は、セッション ID を
埋... -
rdoc
/ generator / json _ index (6040.0) -
他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。
...ータが生成する HTML で検索が行えるように、JSON の検索インデッ
クスを生成するサブライブラリです。
This generator is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.
このジェネレータは HTML ジェネレータと一......ています。:
class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pathname.pwd.expand_path
@json_index = RDoc::Generator::JsonIndex.new self, options
end
def generate
# ...
@json_index.generate
end
end
=== インデック......opyright (c) 2009 Vladimir Kolesnikov
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify,... -
CGI
# header(options = "text / html") -> String (3291.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。
CGI#out を使わずに自力で HTML を出力したい場合などに使います。
このメソッドは文字列エンコーディングを変換しません。
ヘッダのキ......"text/html" です。
: charset
ボディのキャラクタセットを Content-Type ヘッダに追加します。
: nph
真偽値を指定します。真ならば、HTTP のバージョン、ステータスコード、
Date ヘッダをセットします。また Server と Connection の......ります。
: server
サーバソフトウェアの名称指定します。Server ヘッダに対応します。
: connection
接続の種類を指定します。Connection ヘッダに対応します。
: length
送信するコンテンツの長さを指定します。Content-Length ヘッ... -
Ruby用語集 (52.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...Ruby用語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-ba......て処理し、合わせてドキュメントの HTML を生成する。
参照:rdoc
: refinement
既存のクラスやモジュールを特定のスコープでのみ改変する仕組み。
参照:Module#refine、Module#using、main.using
: Ruby Central
Rubyのサポートと世界......った
見た目に関すること、変数・メソッドなどの命名方針、ファイルパスなど。
: コメントアウト
: comment out
コメント化。プログラムの一部分を(コメント化記号の挿入により)コメントにすること。
不要になった処...