Hi Guys,

I am trying to use define_method like:

class TestClass
  def initialize
    define_method("hello") { || puts "Hello" }
  end
end

x = TestClass.new
x.hello

I am always getting:
NoMethodError: undefined method `define_method'

Do I need to require something? Am I doing something wrong, or am I
completely missing the boat!?


Any help appreciated!

Thanks,
Malcolm.