From: Austin Ziegler Date: 2007-02-01T22:58:52+09:00 Subject: Re: Including classes On 2/1/07, Ola Bini wrote: > And further, it's a question of flexibility. Why shouldn't you be able > to do it? Classes represent objects that contain state. Classes have initialization; modules don't contain state (as such). If I were to have: class A; def initialize @foo = 1; end; end class B; def initialize @foo = 2; end; include A; end What would the result be? If you need to "include" a class into another class, use composition and delegation, IMO: class C def initialize @a = A.new; end def method_missing(s, *a, &b); @a.__send__(s, a, b); end end -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca