Decorator Pattern with Mixology
Following a post from jay field on the underuse of modules in ruby I wrote a post suggesting what i believe is the most elegant way to add and remove(!) behavior to a class with the mixology gem.
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Following a post from jay field on the underuse of modules in ruby I wrote a post suggesting what i believe is the most elegant way to add and remove(!) behavior to a class with the mixology gem.
Comments
Or you can use rbmodexcl which gives you an #unextend and #uninclude :-)
Post a comment