Stats

38 Contributors: 1 Tuesday, September 6, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Decorator pattern

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