CHAPTER 8

image

Objects

In the previous chapters we discussed individual data types within the Ruby programming language and how these all work individually. The final data type we will look at is the Object data type. The Object data type (also known as BasicObject) mixes with the Kernel module to import a number of useful methods, which can be utilized for variousscenarios within Ruby programming.

2.1.1 :001 > self.class => Object

Objects are also associated to Object-Oriented Programming. Object orientation is an alternative to the procedural method of programming. Procedural code runs from top to bottom in a very simple and linear way. Object-Oriented ...

Get Ruby Quick Syntax Reference 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.