るりまサーチ

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

別のキーワード

  1. rake filetask
  2. filetask needed?
  3. filetask timestamp
  4. filetask scope_name
  5. rake rake::filetask

モジュール

キーワード

検索結果

Rake::FileTask (18002.0)

ファイルタスクは時間に基づいた依存関係を解決できるタスクです。

ファイルタスクは時間に基づいた依存関係を解決できるタスクです。

このタスクの事前タスクのいずれか一つのタイムスタンプがこのタスクの
タイムスタンプよりも新しければ、与えられたアクションを用いてファイルを再作成します。

Rake::FileTask#needed? -> bool (3002.0)

このタスクが必要である場合は真を返します。 そうでない場合は偽を返します。

...作成しようとしているファイルが古い場合に真を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: "test.txt"
file "test.txt" do |task|
Rake
.application.options.build_all = false
task.needed? # => true
IO.write("test.txt", "test")
task.nee...

Rake::FileTask#timestamp -> Time | Rake::LateTime (3002.0)

ファイルタスクのタイムスタンプを返します。

...ファイルタスクのタイムスタンプを返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: "test.txt"
file "test.txt" do |task|
Rake
.application.options.build_all = false
task.timestamp # => #<Rake::LateTime:0x2ba58f0>
end
//}...

Rake::FileTask.scope_name(scope, task_name) -> String (3002.0)

ファイルタスクはスコープを無視します。

ファイルタスクはスコープを無視します。

Rake::TaskManager#synthesize_file_task(task_name) -> Rake::FileTask | nil (109.0)

与えられたタスク名をもとにファイルタスクを合成します。

.../emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app

task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
IO.write("sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_file => [...

絞り込み条件を変える

Kernel#file(*args) { ... } -> Rake::FileTask (103.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...

Rake::FileCreationTask#needed? -> bool (8.0)

ファイルが存在しない場合、真を返します。 そうでない場合は、偽を返します。

...ファイルが存在しない場合、真を返します。
そうでない場合は、偽を返します。


@see [[FileTask#needed?]]...

Rake::FileCreationTask#timestamp -> Rake::EarlyTime (8.0)

どんなタイムスタンプよりも前の時刻をあらわすタイムスタンプを返します。

...どんなタイムスタンプよりも前の時刻をあらわすタイムスタンプを返します。


@see [[FileTask#timestamp]]...

Rake::MakefileLoader#load(filename) (7.0)

与えられた Makefile をロードします。

...します。

@param filename 読み込む Makefile の名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする
require "rake/loaders/makefile"

task default: :test_rake_app

open "sample.mf", "w" do |io|
io << <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
b: b1 b2 b3 \
b4...
...a6 a7
c: c1
d: d1 d2 \
e f : e1 f1
g\ 0: g1 g\ 2 g\ 3 g4
SAMPLE_MF
end

task :test_rake_app do |task|
loader = Rake::MakefileLoader.new
loader.load("sample.mf")
p Rake::Task.task_defined?("a") # => true
p Rake::Task.tasks[0] # => <Rake::FileTask a => [a1, a2, a3, a4, a5, a6, a7]>
end
//}...