title: How to use define_method inside initialize()
body: <p>Trying to use <code>define_method</code> inside <code>initialize</code> but getting undefined_method <code>define_method</code>. What am I doing wrong?</p>
  
  <pre><code>class C
    def initialize(n)    
      define_method ("#{n}") { puts "some method #{n}" }    
    end
  end
  
  C.new("abc") #=&gt; NoMethodError: undefined method `define_method' for #&lt;C:0x2efae80&gt;
  </code></pre>