るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

クラス

検索結果

Method#arity -> Integer (78508.0)

メソッドが受け付ける引数の数を返します。

メソッドが受け付ける引数の数を返します。

ただし、メソッドが可変長引数を受け付ける場合、負の整数

-(必要とされる引数の数 + 1)

を返します。C 言語レベルで実装されたメソッドが可変長引数を
受け付ける場合、-1 を返します。

//emlist[例][ruby]{
class C
def u; end
def v(a); end
def w(*a); end
def x(a, b); end
def y(a, b, *c); end
def z(a, b, *...