るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.016秒)
トップページ > バージョン:2.3.0[x] > クエリ:ARGF.class[x] > 種類:モジュール[x]

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. argf.class to_a
  5. argf.class gets

ライブラリ

検索結果

MonitorMixin (40.0)

スレッドの同期機構としてのモニター機能を提供するモジュールです。

...スレッドの同期機構としてのモニター機能を提供するモジュールです。

クラスに Module#include したり、オブジェクトに
Object#extend したりすることでそのクラス/オブジェクトに
モニタ機能を追加します。

=== 例

//emlist[消費...
...//emlist[extend する例][ruby]{
require 'monitor'
buf = []
buf.extend(MonitorMixin)
//}

しかし、MonitorMixin をクラス定義の際に Module#include を使って
利用する場合は、initialize メソッドで super() か super を呼んで、初期化する必要があります。...