Inheritance is a common concept in our everyday lives, and, over the last
several lessons, we saw how Ruby implements it: by creating a family of classes
with shared behavior while still differentiating those classes. Because of
inheritance, we can define basic Ruby classes with large reusability, along with
smaller subclasses for more detailed behaviors. We can also take advantage of
inheritance by coding multiple, non-repetitive methods that cut down on the total
amount of code needed while also cleaning and optimizing the code we do need.
We also looked at how we can use the super
keyword to inherit from and extend
methods in the parent class.
You'll encounter inheritance in nearly every program you write.