39件ヒット
[1-39件を表示]
(0.051秒)
検索結果
先頭4件
-
Shell
:: Filter # out(dev = STDOUT , &block) -> () (21320.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls"... -
CSV
. filter(input , output , options = Hash . new) {|row| . . . } (18351.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]{
# $......v
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| . . . } (18251.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]{
# $......v
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| . . . } (18251.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]{
# $......v
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 を指定する]...