Ruby - Iterating over and calling an array of methods
<p>Lets say I have two methods:</p>

<pre><code>def hello
 'hello'
end

def world
 'world'
end
</code></pre>

<p>Now I want to call these methods in a fashion like this:</p>

<pre><code>try_retry{
  hello
}
try_retry{
  world
}
</code></pre>

<p>assume try_retry is a method that will retry the block of code if an error happens. There are a lot of these methods so is it possible to iterate over the blocks? Something like:</p>

<pre><code>array_of_methods = [hello,world]
array_of_methods.each do |method|
  try_retry{
    method
  }
end
</code></pre>

<p>the problem is the methods get evaluated on this line:</p>

<pre><code>array_of_methods = [hello,world]
</code></pre>