Mixins and Modules
Use modules and mixins to extend class functionality without traditional inheritance.
1
Mixins and Modules
Modules allow code organization and reuse without traditional inheritance.
Mixins enable multiple classes to share behavior without being directly related.
In this lesson, you will learn how to use modules and mixins in Ruby.

2
Defining a Module
Modules are defined using the module keyword and cannot be instantiated.
module Greetings
def say_hello
puts 'Hello!'
end
end