Ruby – Modules

Modules are similar to classes, but with one key difference, modules can’t be instantiated.


I have released my new course on Udemy, Kubernetes By Example. Sign up now to get free lifetime access!

modules can hold any combination of the following:

– methods (which I guess will in this case be static methods)
– classes
– constants
– other modules

You drill down using the scope operator (::)

You can thing of modules as containers for organising all your code. In c# we use something similar, called namespaces.