SOLID OOP development – the open/closed principle guide and example
Continuing on our discussion of SOLID development principles, in this guide I'll walk you through the open/closed principle:

For some reason or another, developers seem to struggle understanding this SOLID element more than some of the others. With this in mind, I'll give a dead simple explanation of how the open/closed principle works, followed by a Ruby code example.
I think that once you see how powerful this concept is, you'll fall in love with it because, at it's core, it allows you to scale your code without having to worry about wasting time on legacy classes.
The open/closed principle definition
A dead simple explanation of the open/closed principle is this:
Software elements (classes, modules, functions, and so on) should be open for extension, but closed for modification.
Essentially, this means that you should build your classes in a way that you can extend them via child classes. Once you've created the parent class...