るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.017秒)
トップページ > バージョン:2.6.0[x] > クエリ:out[x] > クエリ:SingleForwardable[x]

別のキーワード

  1. cgi out
  2. cgi/core out
  3. zlib total_out
  4. zstream total_out
  5. zlib avail_out

ライブラリ

検索結果

SingleForwardable (114091.0)

オブジェクトに対し、メソッドの委譲機能を定義するモジュールです。

オブジェクトに対し、メソッドの委譲機能を定義するモジュールです。

=== 使い方

オブジェクトに対して extend して使います。

例:

require 'forwardable'
g = Goo.new
g.extend SingleForwardable
g.def_delegator("@out", :puts)
g.puts ...

また、SingleForwardable はクラスやモジュールに対して以下のようにする事もできます。

require 'forwardable'
class Implementation
def self....