Flowdock
foreach(...) public

Executes the block for every line in the named I/O port, where lines are separated by sep_string.

   IO.foreach("testfile") {|x| print "GOT ", x }

produces:

   GOT This is line one
   GOT This is line two
   GOT This is line three
   GOT And so on...
Show source
Register or log in to add new notes.