25件ヒット
[1-25件を表示]
(0.058秒)
別のキーワード
キーワード
-
append
_ features (11) - push (7)
検索結果
先頭3件
-
Array
# append(*obj) -> self (30310.0) -
指定された obj を順番に配列の末尾に追加します。 引数を指定しなければ何もしません。
...なければ何もしません。
@param obj 自身に追加したいオブジェクトを指定します。
//emlist[例][ruby]{
array = [1, 2, 3]
array.push 4
array.push [5, 6]
array.push 7, 8
p array # => [1, 2, 3, 4, [5, 6], 7, 8]
//}
@see Array#pop, Array#shift, Array#unshift, Array... -
Module
# append _ features(module _ or _ class) -> self (18322.0) -
モジュール(あるいはクラス)に self の機能を追加します。
...][ruby]{
def include(*modules)
modules.reverse_each do |mod|
# append_features や included はプライベートメソッドなので
# 直接 mod.append_features(self) などとは書けない
mod.__send__(:append_features, self)
mod.__send__(:included, self)
end
end
//}
@see... -
Array
# push(*obj) -> self (12110.0) -
指定された obj を順番に配列の末尾に追加します。 引数を指定しなければ何もしません。
...なければ何もしません。
@param obj 自身に追加したいオブジェクトを指定します。
//emlist[例][ruby]{
array = [1, 2, 3]
array.push 4
array.push [5, 6]
array.push 7, 8
p array # => [1, 2, 3, 4, [5, 6], 7, 8]
//}
@see Array#pop, Array#shift, Array#unshift, Array...