るりまサーチ

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

別のキーワード

  1. _builtin hash
  2. hash []
  3. matrix hash
  4. dbm to_hash
  5. _builtin to_hash

ライブラリ

クラス

キーワード

検索結果

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

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

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

ヘッダのキ...
...Variant Also Negotiates"

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

例:
header

# Content-Type: text/html

header
("text/plain")
# Content-Type: text/plain

header
({"nph" => true,...
...e.now + 30,
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})

例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TIT...

CSV::DEFAULT_OPTIONS -> Hash (6207.0)

このオプションは呼び出し側で上書きしなかったときに使用するオプションです。

...るオプションです。

: :col_sep
","
: :row_sep
:auto
: :quote_char
'"'
: :field_size_limit
nil
: :converters
nil
: :unconverted_fields
nil
: :headers
false
: :return_headers
false
: :header_converters
nil
: :skip_blanks
false
: :force_quotes
false
: :skip_lines
nil...

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

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

...ARGF です。

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

@param options ":in_", ":input_" で始まるキーは input にだけ適用されます。
":out_", ":output_" で始まるキーは output に...
...echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

opt
ions = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,header2,header3
# row...
...3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
opt
ions = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first na...

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

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

...ARGF です。

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

@param options ":in_", ":input_" で始まるキーは input にだけ適用されます。
":out_", ":output_" で始まるキーは output に...
...echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

opt
ions = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,header2,header3
# row...
...3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
opt
ions = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first na...

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

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

...ARGF です。

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

@param options ":in_", ":input_" で始まるキーは input にだけ適用されます。
":out_", ":output_" で始まるキーは output に...
...echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

opt
ions = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,header2,header3
# row...
...3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
opt
ions = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first na...

絞り込み条件を変える

CSV.new(data, options = Hash.new) -> CSV (207.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...インスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。

@param options CSV をパースするためのオプションをハッシュで指定します。
パフォーマンス上の理由でインス...
...ルドを返すメソッドを全ての行に追加します。headers オプションによって
追加したヘッダはフィールドではないので
CSV::Row#unconverted_fields は空の配列を返します。
: :headers
:first_row というシンボルか真を指定すると、CS...
...に変更します。
: :return_headers
偽を指定すると、ヘッダ行を無視します。真を指定すると、ヘッダ行を
ヘッダと値が同一の CSV::Row のインスタンスとして返します。
: :write_headers
真を指定して :headers にも値をセットする...

CSV.table(path, options = Hash.new) -> CSV::Table | [Array] (207.0)

以下と同等のことを行うメソッドです。

...ドです。

//emlist[][ruby]{
CSV.read( path, { headers: true,
converters: :numeric,
header
_converters: :symbol }.merge(options) )
//}

@param path ファイル名を指定します。

@param options CSV.new のオプションと同じオプシ...

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

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

..."・"shift_jis" のいずれかで
ある場合は文字列エンコーディングを自動変換し、language を "ja"にします。

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

例:
cgi = CGI.new
cgi.out{ "string" }...
...tml; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30),
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"}){ "string" }

@see CGI#header...

ruby 1.8.4 feature (66.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...re/set_trace_func [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [change]>))
* ((<ruby 1.8.4 feature/printf [bug]>))
* ((<ruby 1.8.4 feature/Hash [bug]>))
* ((<ruby 1.8.4 feature/test [bug]>))
* ((<ruby 1.8.4 feature/File.identical? [new]>))
* ((<ruby 1.8.4 feature/FileTest.identical? [...
...ompat]>))
* ((<ruby 1.8.4 feature/TCPSocket#initialize [bug]>))
* ((<ruby 1.8.4 feature/TCPServer#initialize [bug]>))
* ((<ruby 1.8.4 feature/"optparse">))
* ((<ruby 1.8.4 feature/"find">))
* ((<ruby 1.8.4 feature/Iconv>))
* ((<ruby 1.8.4 feature/WEBrick::Config::FileHandler [compat]>))...
...:CGIHandler#do_GET): the value of Set-Cookie:
# header field should be splited into each cookie. [ruby-Bugs:2199]
#
# * lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookie): new method
# to parse the value of Set-Cookie: header field.
#
# * test/webrick/test_cookie.r...