title: All indexes having the same character in nested array Ruby
body: <p>I'm trying to see if an index, say index 3, all has the same character. For example:</p>
  
  <pre><code>nested_array =   [[47, 44, 71, 'x', 88],
                    [22, 69, 75, 'x', 73],
                    [83, 85, 97, 'x', 57],
                    [25, 31, 96, 'x', 51],
                    [75, 70, 54, 'x', 83]]
  </code></pre>
  
  <p>As we can see, index <code>3</code> has all <code>x'x</code> in it instead of numbers. I want to be able to verify if ALL of the indexes have an <code>x</code>, if so, program returns true. If all but 1 have <code>x's</code> it would return false. </p>
  
  <p>I have now implemented this conditional statement as it iterates through each index looking for a value the size equal to 1. This seemed to do the trick.</p>
  
  <pre><code>if array.map {|zero| zero[0]}.uniq.size == 1
    return true
  elsif array.map {|one| one[1]}.uniq.size == 1
    return true
  elsif array.map {|two| two[2]}.uniq.size == 1
    return true
  elsif array.map {|three| three[3]}.uniq.size == 1
    return true
  elsif array.map {|four| four[4]}.uniq.size == 1
    return true
  else
    return false
  end
  </code></pre>