このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 3.1 リファレンスマニュアル

singleton method Rake::InvocationChain.new

new(task_name, tail)Ruby 1.9.3 から[permalink][rdoc][edit]

与えられたタスク名と一つ前の Rake::InvocationChain を用いて自身を初期化します。

[PARAM] task_name:
タスク名を指定します。
[PARAM] tail:
一つ前の Rake::InvocationChain を指定します。
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
  tail = Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
  p tail.to_s # => "TOP => task_a"
  b = Rake::InvocationChain.new("task_b", tail)
  p b.to_s # => "TOP => task_a => task_b"
end