るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.012秒)

別のキーワード

  1. rake rakefile
  2. rake load_rakefile
  3. application rakefile
  4. application load_rakefile
  5. rakefile rake

ライブラリ

モジュール

検索結果

Rake::Cloneable#clone -> object (21137.0)

自身を複製します。

...ています。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
clone
= file_list.clone
clone
# => ["a.c", "b.c"]
clone
.exclude("a.c")
clone
== file_list # => false
end
//}...

Rake::Cloneable#dup -> object (3024.0)

自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を 全て新たに作成したオブジェクトにコピーします。

...します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.freeze
dup = file_list.dup
clone
= file_list.clone
dup.exclude("a.c") # => ["b.c"]
clone
.exclude("a.c") # => can't modif...