method

find_all

v1_9_1_378 - Show latest stable - Class: Enumerable
find_all()
public

Returns an array containing all elements of enum for which block is not false (see also Enumerable#reject).

(1..10).find_all {|i|  i % 3 == 0 }   #=> [3, 6, 9]

1Note

Video Explanation of find and find_all

MattStopa ยท Mar 11, 2012