I have to sort through a (rows)array of (row)arrays. The (row)arrays contain an arbitrary number of strings. If a (row)array contains only empty strings I want to remove it from the (rows)array.
I'm currently doing this:
rows.each do |row|
row.each_index do |i|
if row[i].length > 0
break
elsif i == row.count-1
rows.delete(row)
end
end
end
But is there a more elegant way to do it?