What's the difference between ruby methods each, collect and map?
Array#collect (and Array#map) return a new array based on the code passed in the block.
Array#each performs an operation (defined by the block) on each element of the array.
More:
http://stackoverflow.com/questions/3630670/distinct-difference-between-collect-and-each