198件ヒット
[1-100件を表示]
(0.075秒)
ライブラリ
- ビルトイン (6)
- delegate (132)
- forwardable (48)
- weakref (12)
クラス
- Delegator (96)
- Proc (6)
- SimpleDelegator (24)
- WeakRef (12)
モジュール
- Forwardable (24)
- Kernel (12)
- SingleForwardable (24)
キーワード
- DelegateClass (12)
-
_ _ getobj _ _ (36) -
_ _ setobj _ _ (24) -
instance
_ delegate (12) -
marshal
_ dump (12) -
marshal
_ load (12) -
method
_ missing (12) -
protected
_ methods (12) -
public
_ methods (12) -
respond
_ to _ missing? (12) -
ruby2
_ keywords (6) -
single
_ delegate (12)
検索結果
先頭5件
-
Kernel
# DelegateClass(superclass) -> object (20307.0) -
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。
...クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、
そのクラスを返します。
@param superclass 委譲先となるクラス
例:
//emlist{
require 'delegate'
class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = E......xtArray.new
p a.class # => ExtArray
a.push 25
p a # => [25]
//}... -
Forwardable
# delegate(hash) -> () (18133.0) -
メソッドの委譲先を設定します。
...。キーは Symbol、
String かその配列で指定します。
例:
require 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end... -
SingleForwardable
# delegate(hash) -> () (18127.0) -
メソッドの委譲先を設定します。
...メソッドの委譲先を設定します。
@param hash 委譲先のメソッドがキー、委譲先のオブジェクトが値の
Hash を指定します。キーは Symbol、
String かその配列で指定します。
@see Forwardable#delegate... -
Delegator
# protected _ methods(all = true) -> [Symbol] (14101.0) -
そのオブジェクトが理解できる protected メソッド名の一覧を返します。
...そのオブジェクトが理解できる protected メソッド名の一覧を返します。
@param all 偽を指定すると __getobj__ のスーパークラスで定義されたメソッドを除きます。
@see Object#protected_methods... -
Delegator
# public _ methods(all = true) -> [Symbol] (14101.0) -
そのオブジェクトが理解できる public メソッド名の一覧を返します。
...そのオブジェクトが理解できる public メソッド名の一覧を返します。
@param all 偽を指定すると __getobj__ のスーパークラスで定義されたメソッドを除きます。
@see Object#public_methods... -
Forwardable
# instance _ delegate(hash) -> () (9233.0) -
メソッドの委譲先を設定します。
...。キーは Symbol、
String かその配列で指定します。
例:
require 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end... -
Delegator
# _ _ getobj _ _ -> object (8107.0) -
委譲先のオブジェクトを返します。
委譲先のオブジェクトを返します。
本メソッドは、サブクラスで再定義する必要があり、
デフォルトでは NotImplementedError が発生します。
@raise NotImplementedError サブクラスにて本メソッドが再定義されていない場合に発生します。 -
Delegator
# _ _ setobj _ _ (obj) -> object (8101.0) -
委譲先のオブジェクトをセットします。
委譲先のオブジェクトをセットします。
@param obj 委譲先のオブジェクトを指定します。
@raise NotImplementedError サブクラスにて本メソッドが再定義されていない場合に発生します。 -
Delegator
# marshal _ dump -> object (8101.0) -
シリアライゼーションをサポートするためにDelegator#__getobj__ が返すオブジェクトを返します。
シリアライゼーションをサポートするためにDelegator#__getobj__ が返すオブジェクトを返します。