4件ヒット
[1-4件を表示]
(0.032秒)
別のキーワード
検索結果
-
Proc
# to _ proc -> self (364.0) -
self を返します。
...self を返します。
//emlist[例][ruby]{
pr = proc {}
p pr == pr.to_proc # => true
//}... -
Proc
# inspect -> String (79.0) -
self の文字列表現を返します。
...self の文字列表現を返します。
可能なら self を生成したソースファイル名、行番号を含みます。
//emlist[例][ruby]{
p Proc.new {
true
}.to_s
# => "#<Proc:0x0x401a880c@-:3>"
//}... -
Proc
# to _ s -> String (79.0) -
self の文字列表現を返します。
...self の文字列表現を返します。
可能なら self を生成したソースファイル名、行番号を含みます。
//emlist[例][ruby]{
p Proc.new {
true
}.to_s
# => "#<Proc:0x0x401a880c@-:3>"
//}... -
Proc
# hash -> Integer (61.0) -
self のハッシュ値を返します。
...self のハッシュ値を返します。
Proc オブジェクトの引数の情報を返します。
Proc オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に対応した以......を表す Symbol の 2 要素です。
//emlist[][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], [...