We can do more than just
require a module, however. We can also
Any class that
includes a certain module can use those module’s methods!
A nice effect of this is that you no longer have to prepend your constants and methods with the module name. Since everything has been pulled in, you can simply write
PI instead of
In our case, we want to use
Math::cos but we don’t want to type
include Math on line 2.