From: Joel VanderWerf Date: 2010-06-23T04:49:22+09:00 Subject: Re: Got to be a better way to code class variables.... Dave Howell wrote: > class Smee > extend SmeeCore # including it for the _class_ > include SmeeCore # including it for the _instances_ > end If you want the extend to happen automatically when you include a module, you can define an included method on M that does it: module M def foo "FOO" end def self.included(c) c.extend M end end class C include M end p C.foo p C.new.foo