In Ruby, modules can provide both namespacing and mixin functionality. Learn how to define module-level functions using module_function and extend self, and the differences between them.