Name

Object — Superclass of all classes

Synopsis

Object is the parent class of all other classes. When a method is defined at the top level, it becomes a private method of this class, making it executable by all classes as if it were a function in other languages.

Included Modules

Kernel

Private Instance Methods

initialize

Initializes an object. Any block and arguments associated with the new method are passed directly to initialize. It’s assumed that this method will be redefined by subclasses for object initialization.

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.