I have the following code:
[array1, array2, array3].transpose
I want to do something like this:
[array1, array2, array3].transpose unless array2[value] == ""
I want to transpose each array, but when the value for array2 that is being transposed is blank I want to skip to the next set of values altogether, ensuring that none of the arrays get transposed.
How can I handle that within Ruby 1.9.3?
[["a","b"], ["", "c"], ["d", "e"]]. Ontranpose, do you want the result as["b", "c", "e"]?["b", "c", "e"]is the end goal.