るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. _builtin i
  5. _builtin $-i

モジュール

検索結果

Kernel.#iterator? -> bool (29221.0)

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

...す。

iterator?
は (ブロックが必ずイテレートするとはいえないので)推奨されていないの
で block_given? を使ってください。

//emlist[例][ruby]{
def check
i
f 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 (14121.0)

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

...す。

iterator?
は (ブロックが必ずイテレートするとはいえないので)推奨されていないの
で block_given? を使ってください。

//emlist[例][ruby]{
def check
i
f block_given?
puts "Block is given."
else
puts "Block isn't given."
end

end

check{} #...
...=> Block is given.
check #=> Block isn't given.
//}...