look at select 

http://ruby-doc.org/core-2.0/Enumerable.html#method-i-select