Module
The Module class is the class of any module you declare with the module keyword. Each module is an instance of the class Module. The class Class is a subclass of the class Module, and so it inherits all the functionality described here.
You can create an anonymous module with Module.new [{block}], the block body is the body of the module. You can assign the module to a variable. If that variable name starts with a capital letter, then it’s a constant and you can treat it exactly like a module that’s created in the more common way.
Information about Modules
The Module class has a number of methods that allow you to dynamically access information about a module or class.
Module (and Class) Hierarchy
You can compare two modules to determine ...
Get Programming Ruby 3.3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.