title: How to dynamically create instance methods at runtime?
body: <p><strong>[ruby 1.8]</strong></p>
  
  <p>Assume I have:</p>
  
  <pre><code>dummy "string" do
      puts "thing" 
  end
  </code></pre>
  
  <p>Now, this is a call to a method which has as input arguments one string and one block. Nice.</p>
  
  <p>Now assume I can have a lot of similar calls (different method names, same arguments). Example:</p>
  
  <pre><code>otherdummy "string" do
      puts "thing"
  end
  </code></pre>
  
  <p>Now because they do the same thing, and they can be hundreds, I don't want create an instance method for each one in the wanted class. I would like rather find a smart way to  define the method dynamically at runtime based on a general rule.</p>
  
  <p>Is that possible? Which techniques are commonly used?</p>
  
  <p>Thanks</p>