As a barista you want the ability to work with your ingredients when selling coffee. You want to have a modern serving method where you can add ingredients dynamically to the orders from your customers to be able to serve them the perfect coffee for their palate.
Add to the current domain classes that will enable you to serve different kinds of coffee to your customers.
-
ColdMilk
-
WarmMilk
-
FrothedMilk
-
Caramel
-
Ice
Once you have created the classes above add specifications in the barista_spec.rb file and start serving coffee.
Sometimes we want to attach responsibilities to an object dynamically without subclassing or extending the behaviour of an existing object. With the decorator we can embellish an object by recursively wrapping it into other objects which share the same interface.