From: Gavin Sinclair Date: 2004-09-14T12:48:15+09:00 Subject: Re: traits & roles Phil wrote: >> Only pure-Ruby solution I can think of is to remember the modules that >> have been mixed in, and selectively reapply earlier ones when >> 'unextend' is called. Pretty fugly. > > Perhaps, but it's probably possible. Is there an 'extended' callback? > if not 'extend' could be redefined. The callback you're after is Module#append_features, from memory. On first thought, I doubt that's useful, because it's from each individual module's POV. If I were implementing this, I'd create new methods rather than modify #entend, at least at first. Something like: Object#wrap(module) Object#unwrap(module) Perhaps a traits lit. review would turn up some agreeable terminology. Cheers, Gavin