るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.080秒)
トップページ > ライブラリ:ビルトイン[x] > バージョン:2.2.0[x] > クエリ:i[x] > クエリ:receiver[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. kernel $-i
  5. matrix i

クラス

検索結果

Binding#receiver -> object (81610.0)

保持するコンテキスト内での self を返します。

保持するコンテキスト内での self を返します。

このメソッドは以下のコードと同様の動作をします。

//emlist[][ruby]{
binding.eval("self")
//}

Method#receiver -> object (72646.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"
//}