We know that to give instances, access to
the Class instance variables, we need
to define new methods like we do here:
Now imagine, that the CoffeeMaker has
not one but five instance variables. For this
to work, we'll have to create 5 methods
to provide access to read them. This can
quickly become difficult to manage.
In Ruby, we can use attr_reader
to give
object instances a simpler way to read
the instance variables: