Back to Developer Roadmap

Inheritance

src/data/roadmaps/ruby/content/inheritance@7HSJh15ice_CG3FtfQ5x6.md

4.0945 B
Original Source

Inheritance

Inheritance in Ruby allows a class (the subclass or derived class) to inherit properties and behaviors from another class (the superclass or base class). This promotes code reuse and establishes an "is-a" relationship. The subclass automatically gains the methods and attributes of the superclass, and can also add its own or override existing ones to customize its behavior.

Visit the following resources to learn more: