January 2024
Intermediate to advanced
718 pages
20h 15m
English
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.
The Module class has a number of methods that allow you to dynamically access information about a module or class.
You can compare two modules to determine ...
Read now
Unlock full access