Da tvrtok 16 Februr 2006 01:33 Phil Tomson napsal: > In article <200602152248.43632.david / vallner.net>, > > David Vallner <david / vallner.net> wrote: > >D=C5=88a Streda 15 Febru=C3=A1r 2006 08:48 Phil Tomson nap=C3=ADsal: > >> The only way to really get it to work would be to remove_method before > >> doing the extend. The problem with that is that remove_method doesn't > >> wo= > > > >rk > > > >> in that context (removing singleton methods). > > > >Not even in the singleton class? > > I couldn't get it to work. Maybe there's some way. > > However, I've come up with another way of doing what I was trying to do. > What I needed was a Simulation functionality (where the code is run) and a > Translation functionality (where the code translated to another language). > Since the user doesn't need to switch from one to the other in the same run > it makes sense to inherit from a different class based on a commandline > argument(or mixin a different module). I'll agree with Robert Klemme's previous post that you probably want to delegate to a strategy in this case. Much less... well... weird. -And- you can switch at your leisure too. David Vallner