Tell me the role of modules and mixins in Ruby?

Submitted by: Muhammad
Modules are Ruby's way of grouping methods, classes, and constants together to provide a namespace for preventing name clashes. The second purpose of modules is to use them as mixins. Technically, Ruby only supports single inheritance, but by using modules as mixins, it is possible to share code among different classes-a key advantage of multiple inheritance-without having to give up the simplicity of the single inheritance paradigm.
Submitted by: Muhammad

Read Online Ruby Developer Job Interview Questions And Answers