0 votes
in Ruby by
Explain module mixins in Ruby.

1 Answer

0 votes
by

Ruby doesn't support multiple inheritance. Modules eliminate the need of multiple inheritance using mixin in Ruby.

A module doesn't have instances because it is not a class. However, a module can be included within a class.

When you include a module within a class, the class will have access to the methods of the module.

Related questions

0 votes
0 votes
asked Nov 15, 2021 in Ruby by Robin
0 votes
0 votes
0 votes
asked Nov 11, 2021 in Ruby by SakshiSharma
...