るりまサーチ

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

別のキーワード

  1. resolv txt
  2. txt new
  3. txt data
  4. txt strings
  5. txt resolv

クラス

モジュール

キーワード

検索結果

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
//}...