In Ruby, I prefer to use inheritance to establish a subtype from an existing object; to say for example that a Car is a kind of Vehicle.
But to use mixins as a way to reuse code. Car and Aircraf, for example, are both kind of vehicles but a Car may include a Wheeled mechanism while an Aircraft an Air::Skied one:
1 2 3 4 5 6 7 8 9 |
|
Decisions regarding what is what deeply depends on your domain knowledge so you’ll end up with a subjective solution hopefully producing a code nice to read then easy to understand.