Most command line applications usually accept a variety of options that can be passed in to alter the behaviour of the application. For example, in linux, the
find command can take a
-type d option to specify only search for directories. For example the following command will find all empty directories under
The Observable module is a useful and elegant way to watch for changes in an object in Ruby. A common example is for alerting of some condition within the object being observed. The example shown in the documentation is for a
Ticker class which has two observers: one for when the price goes below a certain level and one for when the price goes above a certain level. What we will do today is show something similar, but for a
CoffeeShop class instead. Let’s get to it!