O'Reilly logo
  • Gustavo Lopez thinks this is interesting:

As dire as this situation appears, you are not doomed to accept the dependencies. Just as you would DRY out repetitive code inside of a class, DRY out the creation of new Gear instances by creating a single method to wrap the external interface. The classes in your application should depend on code that you own; use a wrapping method to isolate external dependencies.


Cover of Practical Object-Oriented Design in Ruby: An Agile Primer


when you can't change the called upon instance