block_scanf(str) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/scanf.rb, line 682
  def block_scanf(str)
    final = []
# Sub-ideal, since another FS gets created in scanf.
# But used here to determine the number of specifiers.
    fstr = Scanf::FormatString.new(str)
    last_spec = fstr.last_spec
    begin
      current = scanf(str)
      break if current.empty?
      final.push(yield(current))
    end until eof || fstr.last_spec_tried == last_spec
    return final
  end
Register or log in to add new notes.