In my Ruby program, I have an array of five lines, and I want to check if each of the elements of this array matches a given requirement, for example:
a = ['', '', '', '']
a.inject(:blank?)
I ask this question because Ruby has a fairly large standard API with a lot of pre-written syntactic sugar that I want to know and do not want to invent.
source
share