Try this:
my_array.find{|x| x.some_test }
Or here’s a shortcut (thanks @LarsHaugseth for reminding about it)
my_array.find(&:some_test)
Try this:
my_array.find{|x| x.some_test }
Or here’s a shortcut (thanks @LarsHaugseth for reminding about it)
my_array.find(&:some_test)