るりまサーチ

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

別のキーワード

  1. _builtin parameters
  2. proc parameters
  3. method parameters
  4. unboundmethod parameters
  5. tracepoint parameters

クラス

検索結果

Proc#parameters(lambda: nil) -> [object] (18146.0)

Proc オブジェクトの引数の情報を返します。

...&b|}
prc.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
//}

//emlist[lambda: の例][ruby]{
prc = proc{|x, y=42, *other|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.parameters # => x]...
..., [:opt, :y], [:rest, :other
prc = proc{|x, y=42, *other|}
p prc.parameters(lambda: true) # => x], [:opt, :y], [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.parameters(lambda: false) # => x], [:opt, :y], [:rest, :other
//}

@see Method#parameters, UnboundMethod#parameters...

TracePoint#parameters -> [object] (18144.0)

現在のフックが属するメソッドまたはブロックのパラメータ定義を返します。 フォーマットは Method#parameters と同じです。

...現在のフックが属するメソッドまたはブロックのパラメータ定義を返します。
フォーマットは Method#parameters と同じです。

@raise RuntimeError :call、:return、:b_call、:b_return、:c_call、:c_return
イベントのためのイベン...
...トフックの外側で実行した場合に発生します。

//emlist[例][ruby]{
def foo(a, b = 2)
end
TracePoint.new(:call) do |tp|
p tp.parameters # => a], [:opt, :b
end.enable do
foo(1)
end
//}

@see Method#parameters, UnboundMethod#parameters, Proc#parameters...

Method#parameters -> [object] (18122.0)

Method オブジェクトの引数の情報を返します。

...t[例][ruby]{
m = Class.new{define_method(:m){|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}}.instance_method(:m)
m.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
File.method(:symlink).parameters #=> req
//}

@see Proc#parameters...
...st[例][ruby]{
m = Class.new{define_method(:m){|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}}.instance_method(:m)
m.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
File.method(:symlink).parameters #=> req
//}

@see Proc#parameters...

Proc#parameters -> [object] (18122.0)

Proc オブジェクトの引数の情報を返します。

...ck
& で指定されたブロック引数


//emlist[例][ruby]{
prc = lambda{|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}
prc.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
//}


@see Method#parameters, UnboundMethod#parameters...

UnboundMethod#parameters -> [object] (18122.0)

UnboundMethod オブジェクトの引数の情報を返します。

...UnboundMethod オブジェクトの引数の情報を返します。

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



@see Proc#parameters, Method#parameters...

絞り込み条件を変える

Proc#hash -> Integer (27.0)

self のハッシュ値を返します。

...r|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc = proc{|x, y=42, *other|}
p prc.parameters(lambda: true) # => x], [:opt, :y], [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.parameters(lambda: f...