January 2024
Intermediate to advanced
718 pages
20h 15m
English
Modules are a way of grouping together methods, classes, and constants. Modules give you two major benefits:
As you start to write bigger Ruby programs, you’ll find yourself producing chunks of reusable code—libraries of related routines that are applicable in many different contexts. You’ll want to break this code into separate files so the contents can be shared among different Ruby programs.
Often this code will be organized into classes, so you’ll probably stick a class into each file. But sometimes you want to group things together that don’t naturally form a class—for example, the methods that you ...
Read now
Unlock full access