Ruby 2.7.0 リファレンスマニュアル > ライブラリ一覧 > rakeライブラリ > Rake::FileTaskクラス > timestamp
timestamp -> Time | Rake::LateTime
[permalink][rdoc]ファイルタスクのタイムスタンプを返します。
# Rakefile での記載例とする
task default: "test.txt"
file "test.txt" do |task|
Rake.application.options.build_all = false
task.timestamp # => #<Rake::LateTime:0x2ba58f0>
end