るりまサーチ (Ruby 3.0)

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

別のキーワード

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

ライブラリ

キーワード

検索結果

Method#[](*args) -> object (45430.0)

メソッドオブジェクトに封入されているメソッドを起動します。

...せん。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

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

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f...

Method#===(*args) -> object (130.0)

メソッドオブジェクトに封入されているメソッドを起動します。

...せん。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

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

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f...

Method#call(*args) -> object (130.0)

メソッドオブジェクトに封入されているメソッドを起動します。

...せん。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

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

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f...

Method#call(*args) { ... } -> object (130.0)

メソッドオブジェクトに封入されているメソッドを起動します。

...せん。


@param args self に渡される引数。

@see UnboundMethod#bind_call
@see spec/safelevel

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

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f...