るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.075秒)
トップページ > クエリ:-[x] > クエリ:BLOCK[x] > クエリ:iterator?[x]

別のキーワード

  1. socket ip_block_source
  2. socket mcast_block_source
  3. psych block
  4. openssl block_size
  5. digest block_length

ライブラリ

モジュール

検索結果

Kernel.#iterator? -> bool (18244.0)

メソッドにブロックが与えられていれば真を返します。

...e を返します。

iterator?
は (ブロックが必ずイテレートするとはいえないので)推奨されていないの
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.
check #=> Block isn't given.
//}...

Kernel.#block_given? -> bool (6244.0)

メソッドにブロックが与えられていれば真を返します。

...e を返します。

iterator?
は (ブロックが必ずイテレートするとはいえないので)推奨されていないの
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.
check #=> Block isn't given.
//}...