title: Using define_method inside a Module that gets included inside a Class?
body: <p>I got something like this:</p>
  
  <pre><code>module MyModule
      define_method(:foo){ puts "yeah!" }
  end
  
  class User
    include MyModule
  end
  </code></pre>
  
  <p>But this does not work as intended... They are not defined.
  Also I need to use the Module because I want to distinguish the Methods from there from the normal User Methods. Which I do like this:</p>
  
  <pre><code>MyModule.instance_methods
  </code></pre>
  
  <p>Please help .. what am I missing?
  I also tried:</p>
  
  <pre><code>module MyModule
    (class &lt;&lt; self; self; end).class_eval do
      define_method(:foo){ puts "yeah!" }
    end
  end
  </code></pre>
  
  <p>which also doesn't work :/</p>
  
  <p>to clarify ... I would like to use:</p>
  
  <pre><code>User.first.foo
  </code></pre>
  
  <p>not</p>
  
  <pre><code>MyModule.foo
  </code></pre>