24件ヒット
[1-24件を表示]
(0.016秒)
検索結果
-
Kernel
# file(*args) { . . . } -> Rake :: FileTask (9009.0) -
ファイルタスクを定義します。
...ル名を指定します。
例:
file "config.cfg" => ["config.template"] do
open("config.cfg", "w") do |outfile|
open("config.template") do |infile|
while line = infile.gets
outfile.puts line
end
end
end
end
@see Rake::Task.define_task... -
FileUtils
# sh(*cmd) {|result , status| . . . } (27.0) -
与えられたコマンドを実行します。
...は Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end
@see Kernel.#exe...