how to call each function on an array in ruby on rails code example Example: ruby each array a = [ "a", "b", "c" ] a.each {|x| print x, " -- " }