title: Dynamic method chain?
body: <p>How can I call a nested hash of methods names on an object?</p>
  
  <p>For example, given the following hash: </p>
  
  <pre><code>hash = {:a =&gt; {:b =&gt; {:c =&gt; :d}}}
  </code></pre>
  
  <p>I would like to create a method that, given the above hash, does the equivalent of the following:</p>
  
  <pre><code>object.send(:a).send(:b).send(:c).send(:d)
  </code></pre>
  
  <p>The idea is that I need to get a specific attribute from an unknown association (unknown to this method, but known to the programmer).</p>
  
  <p>I would like to be able to specify a method chain to retrieve that attribute in the form of a nested hash. For example:</p>
  
  <pre><code>hash = {:manufacturer =&gt; {:addresses =&gt; {:first =&gt; :postal_code}}}
  car.execute_method_hash(hash)
  =&gt; 90210
  </code></pre>