title: Ruby: How can I group multiple blocks?
body: <p>I have this code where <code>execute</code> is a <a href="https://docs.chef.io/resource_execute.html" rel="nofollow noreferrer">Chef resource</a>:</p>
  
  <pre class="lang-ruby prettyprint-override"><code>execute 'phpbrew_0' do
      command 'phpbrew --verbose install 5.6 +apxs2'
  end
  
  execute 'phpbrew_1' do
      command 'phpbrew --verbose install 7.0 +apxs2'
  end
  
  execute 'phpbrew_2' do
      command 'phpbrew --verbose install 7.1 +apxs2'
  end
  </code></pre>
  
  <p>Does ruby have this feature where I can provide a collection of <code>command</code> and have them all be passed to the <code>execute</code> resource. Something like Javascript's <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer"><code>Array.map</code></a>?</p>