From: Nathaniel Talbott Date: 2003-10-02T10:26:48+09:00 Subject: Re: mixing in class methods Mark J. Reed [mailto:markjreed@mail.com] wrote: > Okay, those both work, assuming all I want is class methods > from the module. I'm guessing I have to break it up. The > original idea was to have a single module, which defined both > class and instance methods, which I could > include/extend/whatever into a class, and then that class > would have both the instance methods (as instance methods) > and the class methods (as class methods) from the module. I've used something like this before: module M def self.append_features(klass) class << klass def class_method p "class_method" end end super end def instance_method p "instance_method" end end class C include M end C.class_method C.new.instance_method Gotta love that Ruby! Nathaniel <:((><