るりまサーチ

最速Rubyリファレンスマニュアル検索!
53件ヒット [1-53件を表示] (0.029秒)
トップページ > クエリ:self[x] > クラス:UnboundMethod[x]

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

ライブラリ

キーワード

検索結果

UnboundMethod#bind_call(recv, *args) -> object (23.0)

self を recv に bind して args を引数として呼び出します。

...
self
を recv に bind して args を引数として呼び出します。

self
.bind(recv).call(*args) と同じ意味です。

//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}

@see UnboundMethod#bind, Method#call...

UnboundMethod#bind_call(recv, *args) { ... } -> object (23.0)

self を recv に bind して args を引数として呼び出します。

...
self
を recv に bind して args を引数として呼び出します。

self
.bind(recv).call(*args) と同じ意味です。

//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}

@see UnboundMethod#bind, Method#call...

UnboundMethod#bind(obj) -> Method (17.0)

self を obj にバインドした Method オブジェクトを生成して返します。

...
self
を obj にバインドした Method オブジェクトを生成して返します。


@param obj 自身をバインドしたいオブジェクトを指定します。ただしバインドできるのは、
生成元のクラスかそのサブクラスのインスタンスのみで...
...ます

//emlist[例][ruby]{
# クラスのインスタンスメソッドの UnboundMethod の場合
class Foo
def foo
"foo"
end
end

# UnboundMethod `m' を生成
p m = Foo.instance_method(:foo) # => #<UnboundMethod: Foo#foo>

# Foo のインスタンスをレシーバとする Method オ...
...ethod: Bar(Foo)#foo>


# モジュールのインスタンスメソッドの UnboundMethod の場合
module Foo
def foo
"foo"
end
end

# UnboundMethod `m' を生成
p m = Foo.instance_method(:foo) # => #<UnboundMethod: Foo#foo>

# Foo をインクルードしたクラス Bar のインスタ...

UnboundMethod#inspect -> String (17.0)

self を読みやすい文字列として返します。

...
self
を読みやすい文字列として返します。

詳しくは Method#inspect を参照してください。

//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}

@see Method#inspect...

UnboundMethod#super_method -> UnboundMethod | nil (17.0)

self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ クトにして返します。

...
self
内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ
クトにして返します。


@see Method#super_method...

絞り込み条件を変える

UnboundMethod#to_s -> String (17.0)

self を読みやすい文字列として返します。

...
self
を読みやすい文字列として返します。

詳しくは Method#inspect を参照してください。

//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}

@see Method#inspect...