From: James Moore Date: 2006-07-14T09:40:46+09:00 Subject: Re: Preferred monkeypatching technique > -----Original Message----- > You just described subclasses: > > class BigNozzleFiretruck < Firetruck > > def put_out_fire(options = {}) > options = options.merge :nozzle => :big > super options > end > > end Sounded to me that perhaps he was talking about the problems that I normally associate with dependency injection* - he's trying to get an existing class to create an object of a new class, rather than the thing that it normally uses. In this case, I think what he's saying is that the existing class is going to instantiate a Firetruck; having BigNozzleFiretruck exist as a possibility of an object that could be instantiated doesn't address the whole problem. Do articles like http://onestepback.org/index.cgi/Tech/Ruby/DependencyInjectionInRuby.rdoc address the sort of thing you're talking about, Tom? - James Moore * A phrase that, unfortunately, I use with wild abandon and less meaning than perhaps I should.