O'Reilly logo
  • Renan Zelli Paim Inacio thinks this is interesting:

To isolate change. I use an object in two different places. I want to change the behavior in one of the two cases. If I change the object, I risk changing both. So I first make a subclass and refer to it in the case that is changing. Now I can modify the subclass without risking an inadvertent change to the other case.


Cover of Refactoring: Ruby Edition


Open/Closed principle