This is an excerpt from the Scala Cookbook (partially modified for the internet). This is a very short recipe, Recipe 8.8, “How to dynamically add a Scala trait to an object instance.”
Rather than add a trait to an entire class, you just want to add a trait to an object instance when the object is created.
Add the trait to the object when you construct it. This is demonstrated in a simple example: