title: Ruby consume array part by part
body: <p>Let's say I've array with n elements. I want to take first ten elements and do something with them and then next ten and so on until array is done.</p>
  
  <p>What's the right Ruby way to do it? (With c-language background I could write some for-loop and inside the loop count to ten, do stuff and set my bookkeeping variable to zero and continue main array handling..)</p>