るりまサーチ (Ruby 3.0)

最速Rubyリファレンスマニュアル検索!
9件ヒット [1-9件を表示] (0.140秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. kernel $-p

ライブラリ

クラス

モジュール

検索結果

Kernel#DelegateClass(superclass) -> object (42658.0)

クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。

クラス 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]
//}

Delegator#marshal_dump -> object (42304.0)

シリアライゼーションをサポートするためにDelegator#__getobj__ が返すオブジェクトを返します。

シリアライゼーションをサポートするためにDelegator#__getobj__ が返すオブジェクトを返します。

Delegator#protected_methods(all = true) -> [Symbol] (42304.0)

そのオブジェクトが理解できる protected メソッド名の一覧を返します。

そのオブジェクトが理解できる protected メソッド名の一覧を返します。

@param all 偽を指定すると __getobj__ のスーパークラスで定義されたメソッドを除きます。

@see Object#protected_methods

Delegator#public_methods(all = true) -> [Symbol] (42304.0)

そのオブジェクトが理解できる public メソッド名の一覧を返します。

そのオブジェクトが理解できる public メソッド名の一覧を返します。

@param all 偽を指定すると __getobj__ のスーパークラスで定義されたメソッドを除きます。

@see Object#public_methods

Delegator#respond_to?(m) -> bool (42304.0)

Delegator#__getobj__ が返すオブジェクトが メソッド m を持つとき真を返します。

Delegator#__getobj__ が返すオブジェクトが メソッド m を持つとき真を返します。

@param m メソッド名

@see Object#respond_to?

絞り込み条件を変える

Delegator#respond_to_missing?(m, include_private) -> bool (42304.0)

@param m メソッド名を指定します。

@param m メソッド名を指定します。

@param include_private 真を指定すると private メソッドも調べます。

SimpleDelegator#__getobj__ -> object (33004.0)

委譲先のオブジェクトを返します。

委譲先のオブジェクトを返します。

@see Delegator#__getobj__

SimpleDelegator#__setobj__(obj) -> object (33004.0)

委譲先のオブジェクトを obj に変更します。

委譲先のオブジェクトを obj に変更します。

メソッド委譲を行うためのクラスメソッドの再定義は行われないことに注意してください。
メソッド委譲を行うためのクラスメソッドの定義は生成時にのみ行われます。
そのため、以前の委譲先オブジェクトと
obj の間で呼び出せるメソッドに違いがあった場合は、
何かしらの例外が発生する可能性があります。

@param obj 委譲先のオブジェクト

@return 変更後の委譲先オブジェクト

Proc#ruby2_keywords -> proc (9322.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.

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 ...