From: Gary Wright Date: 2007-11-09T05:18:00+09:00 Subject: Re: standard, pretty, and flexible meta-methods? On Nov 8, 2007, at 2:57 PM, Greg Weeks wrote: > Is there a way to make meta-methods like "def_foo" available in class > definitions without using inheritance? Is there a standard way? > Is it > pretty? (Or is it perhaps pointless?) 1) Put your method definition in a module: module M def my_class_method # do something end end 2) extend your class object with your module class A extend M end 3) use your methods from M class A my_class_method end Of course you can combine 2 and 3: class A extend M my_class_method end