44件ヒット
[1-44件を表示]
(0.034秒)
別のキーワード
クラス
-
Rake
:: FileTask (22) - String (11)
モジュール
-
Rake
:: TaskManager (11)
キーワード
-
create
_ rule (11) - needed? (11)
- pathmap (11)
検索結果
先頭4件
-
String
# pathmap(spec = nil) { . . . } -> String (26.0) -
与えられた書式指定文字列に応じてパス(自身)を変換します。
...ント自身を表します。
%d は数値のプレフィクスを取ることができます。
例:
'a/b/c/d/file.txt'.pathmap("%2d") # => 'a/b'
'a/b/c/d/file.txt'.pathmap("%-2d") # => 'c/d'
また、%d, %p, %f, %n, %x, %X には単純な文字列置換を行うための
置換パタ......athmap("%{^src,bin}X.class")
#=> "bin/org/onestepback/proj/A.class"
置換文字列に '*' を指定した場合は、置換文字列を計算するためにブロックを評価します。
例:
"/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext| ext.downcase }
#=> "/path/to/file.txt"... -
Rake
:: FileTask # needed? -> bool (20.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.needed? # => false
end
//}... -
Rake
:: FileTask # timestamp -> Time | Rake :: LateTime (14.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
:: TaskManager # create _ rule(*args) { . . . } (14.0) -
与えられたパラメータに従ってルールを作成します。
...に与えるパラメータを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
rule = Rake.application.create_rule '.txt' => '.md' do |t|
"#{t}"
end
p rule # => 0x0000558dd2e32d20 /path/to/Rakefile:5>
end
//}...