title: Is there a way to create methods just for the instance of a Ruby class from inside that instance?
body: <p>Let there be <code>class Example</code> defined as: </p>
  
  <pre><code>class Example
    def initialize(test='hey')
      self.class.send(:define_method, :say_hello, lambda { test })
    end
  end
  </code></pre>
  
  <p>On calling <code>Example.new; Example.new</code> I get a <code>warning: method redefined; discarding old say_hello</code>. This, I conclude, must be because it defines a method in the actual class (which makes sense, from the syntax). And that, of course, would prove disastrous should there be multiple instances of <code>Example</code> with different values in their methods.</p>
  
  <p>Is there a way to create methods just for the instance of a class from inside that instance?</p>