From: Jason Stewart Date: 2011-02-13T22:51:38+09:00 Subject: Re: DCI and ruby On Sun, Feb 13, 2011 at 5:51 AM, Michel Demazure wrote: > The following post is interesting > > http://andrzejonsoftware.blogspot.com/2011/02/dci-and-rails.html > > In the DCI way, an object can be assigned a role by extending a module > bringing the methods pertaining to this role > > obj = Klass.new > obj extend Role > > But, how to change roles, without cluttering the metaclass hierarchy ? > I read the article and found it interesting as well. How about mixology? (http://rubyforge.org/projects/mixology/) It lets you mix in and unmix to get the old behavior back. Cheers, Jason