るりまサーチ

最速Rubyリファレンスマニュアル検索!
187件ヒット [1-100件を表示] (0.071秒)

別のキーワード

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

ライブラリ

クラス

モジュール

検索結果

<< 1 2 > >>

CGI#out(options = "text/html") { .... } (18326.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...
...ARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 *...

RDoc::Options#force_output -> bool (9200.0)

コマンドライン引数の --force_output オプションを指定していた場合、true を返します。--no-force_output オプションを指定していた場合、false を返 します。

...コマンドライン引数の --force_output オプションを指定していた場合、true
を返します。--no-force_output オプションを指定していた場合、false を返
します。

どちらも指定しなかった場合は true を返します。...

RDoc::Options#force_output=(val) (9200.0)

val に true を指定した場合、コマンドライン引数の --force_output オプショ ンと同様の指定を行います。

...val に true を指定した場合、コマンドライン引数の --force_output オプショ
ンと同様の指定を行います。

@param val --force_output オプションと同じ指定を行う場合は true、そうで
ない場合は false を指定します。...

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

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

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

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

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

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

//emlist[例: input, output は初期値][ruby]{
# $...
...csv

require "csv"

options
= { 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
# row1_1,row1_2,row1_3
//}

//emlist[例: input, output を指定す...

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

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

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

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

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

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

//emlist[例: input, output は初期値][ruby]{
# $...
...csv

require "csv"

options
= { 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
# row1_1,row1_2,row1_3
//}

//emlist[例: input, output を指定す...

絞り込み条件を変える

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

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

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

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

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

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

//emlist[例: input, output は初期値][ruby]{
# $...
...csv

require "csv"

options
= { 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
# row1_1,row1_2,row1_3
//}

//emlist[例: input, output を指定す...

Open3.#pipeline_r(*cmds) {|last_stdout, wait_thrs| ... } -> () (6230.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。

...以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options
には Hash で指定します。
env には環境変数を Hash で指定し...
...定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]

@return ブロックを指定した場合は...
...列で返します。

例:

require "open3"

Open3.pipeline_r("yes", "head -10") {|r, ts|
p r.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n"
p ts[0].value #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
}

@see Open3.#...

Open3.#pipeline_rw(*cmds) {|first_stdin, last_stdout, wait_thrs| ... } -> () (6230.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事も最後のコマンドの標準出力を受けとる事も できます。

...以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options
には Hash で指定します。
env には環境変数を Hash で指定し...
...定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]

@return ブロックを指定した場合は...
...列で返します。

例:

require "open3"

Open3.pipeline_rw("sort", "cat -n") {|stdin, stdout, wait_thrs|
stdin.puts "foo"
stdin.puts "bar"
stdin.puts "baz"

# sortコマンドにEOFを送る。
stdin.close

# stdinに渡した文字列をsortコマンドが...

Open3.#pipeline_w(*cmds) -> [IO, [Thread]] (6136.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事ができます。

...以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options
には Hash で指定します。
env には環境変数を Hash で指定し...
...定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]

@return ブロックを指定した場合は...
...た場合は最初に実行するコマンドの標準入力、
実行したプロセスを待つためのスレッドの配列を配列で返します。

例:

require "open3"

Open3.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|w, ts|
w.puts "hello"
}

@see Open3.#popen3...

Open3.#pipeline_w(*cmds) {|first_stdin, wait_thrs| ... } -> () (6136.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事ができます。

...以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options
には Hash で指定します。
env には環境変数を Hash で指定し...
...定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]

@return ブロックを指定した場合は...
...た場合は最初に実行するコマンドの標準入力、
実行したプロセスを待つためのスレッドの配列を配列で返します。

例:

require "open3"

Open3.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|w, ts|
w.puts "hello"
}

@see Open3.#popen3...

絞り込み条件を変える

<< 1 2 > >>