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

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

instance method Rake::FileList#pathmap

pathmap(spec = nil) -> Rake::FileList[permalink][rdoc]

各要素に String#pathmap を適用した新しい Rake::FileList を返します。

# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
  file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
  file_list.pathmap("%n") # => ["test1", "test2", "test3"]
end

[SEE_ALSO] String#pathmap