るりまサーチ

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

別のキーワード

  1. rake append
  2. fcntl o_append
  3. invocationchain append
  4. mutex_m append_features
  5. readline completion_append_character

クラス

モジュール

キーワード

検索結果

File::Constants::APPEND -> Integer (18103.0)

追記モードでファイルを開くときに指定します。 File.openで使用します。

追記モードでファイルを開くときに指定します。
File.openで使用します。

Module#append_features(module_or_class) -> self (6121.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 (6103.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 (3003.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 (8.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 (8.0)

file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。

...プンします。
オープン時にファイルがすでに存在していれば
その内容を空にします。

: "a", WRONLY|CREAT|APPEND
ファイルを書き込みモードでオープンします。
出力は 常に ファイルの末尾に追加されます。
例え...

Kernel.#open(file, mode_enc = "r", perm = 0666) {|io| ... } -> object (8.0)

file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。

...プンします。
オープン時にファイルがすでに存在していれば
その内容を空にします。

: "a", WRONLY|CREAT|APPEND
ファイルを書き込みモードでオープンします。
出力は 常に ファイルの末尾に追加されます。
例え...

Module#include(*mod) -> self (8.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) -> () (8.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...