るりまサーチ

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

別のキーワード

  1. encoding windows_31j
  2. encoding cswindows31j
  3. _builtin windows_31j
  4. _builtin cswindows31j
  5. json j

ライブラリ

検索結果

Method#receiver -> object (27226.0)

このメソッドオブジェクトのレシーバを返します。

...のメソッドオブジェクトのレシーバを返します。

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.receiver # => #<Foo:0x007fb39203eb78>
m.receiver.foo(1) # => "foo called with arg 1"
//}...