Decorator pattern

Download ruby-on-rails eBook

Remarks

The Decorator pattern allows you to add or modify behavior of objects in a situational way without affecting the base object.

This can be achieved though plain Ruby using the stdlib, or via popular gems such as Draper.

Related Examples

Stats

38 Contributors: 1
Tuesday, September 6, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook