33件ヒット
[1-33件を表示]
(0.027秒)
種類
- クラス (11)
- インスタンスメソッド (11)
- 特異メソッド (11)
クラス
- SimpleDelegator (11)
モジュール
- Kernel (11)
キーワード
- DelegateClass (11)
- SimpleDelegator (11)
検索結果
-
SimpleDelegator
. new(obj) -> object (18109.0) -
メソッドを委譲するオブジェクトの設定と、 メソッド委譲を行うためのクラスメソッドの定義を行います。
...メソッドを委譲するオブジェクトの設定と、
メソッド委譲を行うためのクラスメソッドの定義を行います。
@param obj 委譲先のオブジェクト
@see Delegator.new... -
SimpleDelegator (14.0)
-
Delegator クラスを継承し、シンプルなメソッド委譲を実現した具象クラス。
...し、シンプルなメソッド委譲を実現した具象クラス。
委譲先に指定されたオブジェクトへメソッドの実行を委譲します。
例:
//emlist{
require 'delegate'
foo = Object.new
def foo.test
p 25
end
foo2 = SimpleDelegator.new(foo)
foo2.test # => 25
//}... -
Kernel
# DelegateClass(superclass) -> object (8.0) -
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。
...ラスを定義し、
そのクラスを返します。
@param superclass 委譲先となるクラス
例:
//emlist{
require 'delegate'
class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = ExtArray.new
p a.class # => ExtArray
a.push 25
p a # => [25]
//}...