Classes and Modules
Support for OOP in Ruby can be found in the Ruby classes
Class
and Module
. All class
objects are of class Class
, and the
Module
class provides support for namespaces and
mix-ins.
Get Ruby in a Nutshell 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.