... continued
This lesson continues the discussion on Monitor in Ruby.
We'll cover the following...
Monitor Mixin
A mixin, when added to a class, augments it with additional capabilities without using inheritance. In Ruby, a mixin is a code wrapped up in a module that a class can include or extend. The standard library offers a mixin called MonitorMixin
. We can either include it in our class or extend an object of our class with it to gain monitor functionality.
Let's consider an example class Person
as follows: ...