22件ヒット
[1-22件を表示]
(0.208秒)
ライブラリ
- ビルトイン (22)
検索結果
-
Kernel
. # block _ given? -> bool (18114.0) -
メソッドにブロックが与えられていれば真を返します。
...(ブロックが必ずイテレートするとはいえないので)推奨されていないの
で block_given? を使ってください。
//emlist[例][ruby]{
def check
if block_given?
puts "Block is given."
else
puts "Block isn't given."
end
end
check{} #=> Block is given.
ch... -
Kernel
. # iterator? -> bool (3014.0) -
メソッドにブロックが与えられていれば真を返します。
...(ブロックが必ずイテレートするとはいえないので)推奨されていないの
で block_given? を使ってください。
//emlist[例][ruby]{
def check
if block_given?
puts "Block is given."
else
puts "Block isn't given."
end
end
check{} #=> Block is given.
ch...