190件ヒット
[1-100件を表示]
(0.099秒)
ライブラリ
- ビルトイン (36)
- matrix (10)
- rake (24)
-
rexml
/ document (120)
クラス
- Array (24)
- Matrix (5)
- Object (12)
-
REXML
:: Attribute (12) -
REXML
:: CData (12) -
REXML
:: Comment (12) -
REXML
:: DocType (12) -
REXML
:: Document (12) -
REXML
:: Element (12) -
REXML
:: Instruction (12) -
REXML
:: Parent (12) -
REXML
:: Text (12) -
REXML
:: XMLDecl (12) - Vector (5)
モジュール
-
Rake
:: Cloneable (24)
キーワード
-
deep
_ clone (12) - dup (24)
検索結果
先頭5件
-
Rake
:: Cloneable # clone -> object (24132.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
/... -
Array
# clone -> Array (21208.0) -
レシーバと同じ内容を持つ新しい配列を返します。
...レシーバと同じ内容を持つ新しい配列を返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容と tainted だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり......ているオブジェクトが変わらない「浅い(shallow)」コピーを行います。
//emlist[例][ruby]{
ary = ['string']
p ary #=> ["string"]
copy = ary.dup
p copy #=> ["string"]
ary[0][0...3] = ''
p ary #=> ["ing"]
p copy #=> ["ing"]
//}......レシーバと同じ内容を持つ新しい配列を返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり参照して......いるオブジェクトが変わらない「浅い(shallow)」コピーを行います。
//emlist[例][ruby]{
ary = ['string']
p ary #=> ["string"]
copy = ary.dup
p copy #=> ["string"]
ary[0][0...3] = ''
p ary #=> ["ing"]
p copy #=> ["ing"]
//}... -
Matrix
# clone -> Matrix (21202.0) -
自分自身のコピーを返します。
自分自身のコピーを返します。 -
REXML
:: Attribute # clone -> REXML :: Element (21202.0) -
self を複製し返します。
self を複製し返します。 -
REXML
:: CData # clone -> REXML :: CData (21202.0) -
self を複製して返します。
self を複製して返します。
親ノードの情報は複製されません。 -
REXML
:: Comment # clone -> REXML :: Comment (21202.0) -
内容が複製された Comment オブジェクトを返します。 (親ノードの情報は複製されません)。
内容が複製された Comment オブジェクトを返します。
(親ノードの情報は複製されません)。 -
REXML
:: DocType # clone -> REXML :: DocType (21202.0) -
self の複製を返します。
...self の複製を返します。
external_id (REXML::DocType#external_id) と
名前(REXML::DocType#name) のみ複製されるため、
結果として得られるオブジェクトはあまり有用ではないでしょう。... -
REXML
:: Document # clone -> REXML :: Document (21202.0) -
self を複製します。
...self を複製します。
REXML::Document.new(self) と同じです。... -
REXML
:: Element # clone -> REXML :: Element (21202.0) -
self を複製して返します。
self を複製して返します。
複製されるのは名前、属性、名前空間のみです。
子ノードは複製されません。