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

The wheelify method contains the only bit of code that understands the structure of the incoming array. If the input changes, the code will change in just this one place.


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


there is just 1 place where
wheel.tire is defined .... if array changes this is the only place where changes need to be made.

IE. Array[1] = TireSize
Array[2] = TireSize .... then only 1 place that needs this change