ライブラリ
- ビルトイン (18)
- delegate (204)
- forwardable (48)
クラス
- Delegator (168)
- Module (12)
- Proc (6)
- SimpleDelegator (24)
モジュール
- Forwardable (24)
- Kernel (12)
- SingleForwardable (24)
キーワード
- ! (12)
- != (12)
- == (12)
- DelegateClass (12)
-
_ _ getobj _ _ (24) -
_ _ setobj _ _ (24) - freeze (12)
-
instance
_ delegate (12) -
marshal
_ dump (12) -
marshal
_ load (12) -
method
_ missing (12) - methods (12)
-
protected
_ methods (12) -
public
_ methods (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) -
ruby2
_ keywords (18) -
single
_ delegate (12)
検索結果
先頭5件
-
Delegator
# _ _ getobj _ _ -> object (11001.0) -
委譲先のオブジェクトを返します。
...オブジェクトを返します。
本メソッドは、サブクラスで再定義する必要があり、
デフォルトでは NotImplementedError が発生します。
@raise NotImplementedError サブクラスにて本メソッドが再定義されていない場合に発生します。... -
Delegator
# _ _ setobj _ _ (obj) -> object (11001.0) -
委譲先のオブジェクトをセットします。
...委譲先のオブジェクトをセットします。
@param obj 委譲先のオブジェクトを指定します。
@raise NotImplementedError サブクラスにて本メソッドが再定義されていない場合に発生します。... -
Delegator
# freeze -> self (11001.0) -
自身を凍結します。
自身を凍結します。
@see Object#freeze -
SimpleDelegator
# _ _ getobj _ _ -> object (11001.0) -
委譲先のオブジェクトを返します。
...委譲先のオブジェクトを返します。
@see Delegator#__getobj__... -
SimpleDelegator
# _ _ setobj _ _ (obj) -> object (11001.0) -
委譲先のオブジェクトを obj に変更します。
委譲先のオブジェクトを obj に変更します。
メソッド委譲を行うためのクラスメソッドの再定義は行われないことに注意してください。
メソッド委譲を行うためのクラスメソッドの定義は生成時にのみ行われます。
そのため、以前の委譲先オブジェクトと
obj の間で呼び出せるメソッドに違いがあった場合は、
何かしらの例外が発生する可能性があります。
@param obj 委譲先のオブジェクト
@return 変更後の委譲先オブジェクト -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (6107.0) -
For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.
...the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, th......marked with a special
flag such that if it is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the method to
o......ther methods.
This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions... -
Proc
# ruby2 _ keywords -> proc (6107.0) -
Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.
...as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked with a special f......r method call, and that
method call does not include explicit keywords or a keyword splat, the
final element is interpreted as keywords. In other words, keywords will
be passed through the proc to other methods.
This should only be used for procs that delegate keywords to another
method, and only......wards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Also, be aware that if this method i...