CSC/ECE 517 Fall 2011/ch4 4c ap
Modules and Mixins
Regular Expressions
Modules and Mixins
Mixins
Comparable
Composing Modules
Simulating Multiple Inheritance
Multiple Inheritance has several disadvantages that can lead to ambiguous code behavior either during compile time or run time. Ruby does not support direct Multiple Inheritance. But, Mutiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.
Example - Taggable string