ruby inheritance vs mixins
问题 In Ruby, since you can include multiple mixins but only extend one class, it seems like mixins would be preferred over inheritance. My question: if you\'re writing code which must be extended/included to be useful, why would you ever make it a class? Or put another way, why wouldn\'t you always make it a module? I can only think of one reason why you\'d want a class, and that is if you need to instantiate the class. In the case of ActiveRecord::Base, however, you never instantiate it directly