From: dblack@... Date: 2006-05-14T16:46:00+09:00 Subject: Re: "Seeing Metaclasses Clearly" Hi -- On Sun, 14 May 2006, dblack@wobblini.net wrote: > You'd need to do: > > def self.company(name) > metaclass.instance_eval do # or class_eval > define_method(name) { name } > end > end Whoops, as Ross pointed out, it should be define_method(:company), not define_method(name). (And it was, in the version I tested. Honest! :-) David -- David A. Black (dblack@wobblini.net) * Ruby Power and Light, LLC (http://www.rubypowerandlight.com) > Ruby and Rails consultancy and training * Author of "Ruby for Rails" from Manning Publications! > http://www.manning.com/black