I have defined class X. Anytime X is inherited (say, by Y), I want to
generate a global function definition
    def y(...) { ... }

The hook I am using is
class X
    def self.inherited(child)
        ...
    end
end

What should go into the ...? Should it be

Object.class_eval "def #{child.name.downcase} ... end" ?

Thanks