るりまサーチ

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

別のキーワード

  1. _builtin list
  2. ftp list
  3. net/ftp list
  4. benchmark list
  5. cgi scrolling_list

ライブラリ

モジュール

検索結果

Rake::Cloneable#clone -> object (21150.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 (3043.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...
...modify frozen Rake::FileList
end
//}...