るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.066秒)
トップページ > クエリ:IO[x] > クエリ:l[x] > クエリ:new[x] > クエリ:header[x] > クエリ:out[x]

別のキーワード

  1. kernel $-l
  2. matrix l
  3. lupdecomposition l
  4. _builtin $-l
  5. $-l kernel

ライブラリ

クラス

検索結果

CGI#header(options = "text/html") -> String (18375.0)

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

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

ヘッダのキ...
...OT_IMPLEMENTED" --> "501 Method Not Implemented"
"BAD_GATEWAY" --> "502 Bad Gateway"
"VARIANT_ALSO_VARIES" --> "506 Variant Also Negotiates"

@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。

例:
header
...
...text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + 30,
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})

例:
cgi = CGI.new('html3')...

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

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

...グを自動変換し、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" => true,
"status" => "OK", # == "200 OK"
"server" => ENV['SERVER_SOFTW...
...ml",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30),
"cookie" => [cookie1, cookie2],
"my_header...

CSV.filter(input, output, options = Hash.new) {|row| ... } (6487.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...全て output に書き込
みます。

@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":i...
...":out_", ":output_" で始まるキーは output にだけ適用されます。
それ以外のキーは両方に適用されます。
":output_row_sep" のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\n...
...<< "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jiro suzuki
# 3,ami,sato,19,ami sato
# 4,yumi,adachi,21,yumi adachi
//}

@see CSV.new...

CSV.filter(input, options = Hash.new) {|row| ... } (6387.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...全て output に書き込
みます。

@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":i...
...":out_", ":output_" で始まるキーは output にだけ適用されます。
それ以外のキーは両方に適用されます。
":output_row_sep" のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\n...
...<< "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jiro suzuki
# 3,ami,sato,19,ami sato
# 4,yumi,adachi,21,yumi adachi
//}

@see CSV.new...

CSV.filter(options = Hash.new) {|row| ... } (6387.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...全て output に書き込
みます。

@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":i...
...":out_", ":output_" で始まるキーは output にだけ適用されます。
それ以外のキーは両方に適用されます。
":output_row_sep" のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\n...
...<< "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jiro suzuki
# 3,ami,sato,19,ami sato
# 4,yumi,adachi,21,yumi adachi
//}

@see CSV.new...

絞り込み条件を変える