method
block_scanf
block_scanf(fstr,&b)
public
Hide source
# File lib/scanf.rb, line 684 def block_scanf(fstr,&b) fs = Scanf::FormatString.new(fstr) str = self.dup final = [] begin current = str.scanf(fs) final.push(yield(current)) unless current.empty? str = fs.string_left end until current.empty? || str.empty? return final end