EZ

Eduzan

Learning Hub

Eduzan
Eduzan / Ruby

OOP Concepts in Ruby

Object-Oriented Programming (OOP) is a way of organizing code around objects, which represent real-world entities. In Ruby, everything is an object—including numbers, strings, arrays, and even classes.

In OOP, a class is a blueprint, and an object is an instance of that blueprint. For example, if Vehicle is a class, then car1 and car2 are objects created from it—each with its own attribute values.


End of lesson.