title: Adding every last element in an array of arrays -rails 3
body: <p>i have an array of arrays such as:-</p>
  
  <pre><code> a=[["product1", "size1", "color1", "quantity1"],["product2", "size2", "color2", "quantity2"],["product3", "size3", "color3", "quantity3"]]
  </code></pre>
  
  <p>Now the above Array of arrays has quantity as last element in every array such as quantity1,quantity2,quantity3 and quantity4.i want to add every quantity(last element) to show total quantity <strong>*<em>such as quantity1+quantity2+quantity3+quantity4</em>*</strong>
  can i use inject() method,any suggestions??</p>