91件ヒット
[1-91件を表示]
(0.210秒)
種類
- インスタンスメソッド (47)
- モジュール関数 (22)
- 定数 (11)
- クラス (11)
ライブラリ
- ビルトイン (91)
モジュール
-
File
:: Constants (11) - Kernel (22)
検索結果
先頭5件
-
File
:: Constants :: APPEND -> Integer (26101.0) -
追記モードでファイルを開くときに指定します。 File.openで使用します。
追記モードでファイルを開くときに指定します。
File.openで使用します。 -
Module
# append _ features(module _ or _ class) -> self (14119.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
# append(*obj) -> self (14101.0) -
指定された obj を順番に配列の末尾に追加します。 引数を指定しなければ何もしません。
指定された 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#<< -
Array
# push(*obj) -> self (11001.0) -
指定された obj を順番に配列の末尾に追加します。 引数を指定しなければ何もしません。
指定された 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#<< -
Class (8006.0)
-
クラスのクラスです。
...すが、それ以外のほとんどの機能は Module から継
承されています。Module のメソッドのうち
* Module#module_function
* Module#extend_object
* Module#append_features
* Module#prepend_features
* Module#refine
は Class では未定義にされています。... -
Kernel
. # open(file , mode _ enc = "r" , perm = 0666) -> IO (8006.0) -
file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。
...プンします。
オープン時にファイルがすでに存在していれば
その内容を空にします。
: "a", WRONLY|CREAT|APPEND
ファイルを書き込みモードでオープンします。
出力は 常に ファイルの末尾に追加されます。
例え... -
Kernel
. # open(file , mode _ enc = "r" , perm = 0666) {|io| . . . } -> object (8006.0) -
file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。
...プンします。
オープン時にファイルがすでに存在していれば
その内容を空にします。
: "a", WRONLY|CREAT|APPEND
ファイルを書き込みモードでオープンします。
出力は 常に ファイルの末尾に追加されます。
例え... -
Module
# include(*mod) -> self (8006.0) -
モジュール mod をインクルードします。
...場合に発生します。
//emlist[例][ruby]{
module M
end
module M2
include M
end
module M
include M2
end
//}
実行結果:
-:3:in `append_features': cyclic include detected (ArgumentError)
from -:3:in `include'
from -:3
インクルードとは、指定された... -
Module
# included(class _ or _ module) -> () (8006.0) -
self が Module#include されたときに対象のクラスまたはモジュー ルを引数にしてインタプリタがこのメソッドを呼び出します。
...このメソッドを呼び出します。
@param class_or_module Module#include を実行したオブジェクト
//emlist[例][ruby]{
module Foo
def self.included(mod)
p "#{mod} include #{self}"
end
end
class Bar
include Foo
end
# => "Bar include Foo"
//}
@see Module#append_features...