Say I have an array of arrays in Ruby,
array = [["bob", 12000, "broke", "ugly"],
["kelly", 50000, "rich", "attractive"]]
Each subarray is just a record. What's syntactically the most elegant construct for testing certain elements of each subarray for certain conditions, such as
- Is the zeroth element in every array a string?
- Is the second element in every array an integer?
Thanks!