From: Timothy Goddard Date: 2006-04-02T08:03:46+09:00 Subject: Re: Dynamic code generation Firstly you confuse things too much by using the same name as an instance and class method. There's probably an easier way but try this: class ParentClass def self.say "This is a message" end def self.make_it_say(message) class_methods = Module.new do define_method :say do message end end self.extend(class_methods) end end class ChildClass < ParentClass make_it_say "I've been redefined!" end puts ParentClass.say puts ChildClass.say