title: Change all items of an array at once
body: <p>I wonder if there is a way of avoiding looping through all items of a list to access the same attribute.</p>
  
  <pre><code>people = [John, Bob, Dave, Eric]
  </code></pre>
  
  <p>with each have a number attribute (i.e. <code>John.num</code>)</p>
  
  <p>so instead of <code>people.map{|person| person.num =10}</code></p>
  
  <p>I might do <code>people.[...some magic..].num = 10</code></p>
  
  <p>It just seems a waste to loop through all.. maybe with SQL or similar</p>