each() public

Calls block once for each element in self, passing that element as a parameter.

   a = [ "a", "b", "c" ]
   a.each {|x| print x, " -- " }

produces:

   a -- b -- c --
Show source
Register or log in to add new notes.