2件ヒット
[1-2件を表示]
(0.043秒)
クラス
- SimpleDelegator (1)
検索結果
-
SimpleDelegator
. new(obj) -> object (117328.0) -
メソッドを委譲するオブジェクトの設定と、 メソッド委譲を行うためのクラスメソッドの定義を行います。
メソッドを委譲するオブジェクトの設定と、
メソッド委譲を行うためのクラスメソッドの定義を行います。
@param obj 委譲先のオブジェクト
@see Delegator.new -
SimpleDelegator (114061.0)
-
Delegator クラスを継承し、シンプルなメソッド委譲を実現した具象クラス。
...し、シンプルなメソッド委譲を実現した具象クラス。
委譲先に指定されたオブジェクトへメソッドの実行を委譲します。
例:
//emlist{
require 'delegate'
foo = Object.new
def foo.test
p 25
end
foo2 = SimpleDelegator.new(foo)
foo2.test # => 25
//}...