From: Eero Saynatkari Date: 2006-08-29T23:43:52+09:00 Subject: Re: Including a class. Ola Bini wrote: > Mauricio Fernandez wrote: >>> inherit the other class. >> [...] >> >>> But I can't have an instance of Bar or Foo so delegating is impossible. >> ======================== >>> I need the methods to be in the the same instance. >> >> Doesn't this provide a very strong indication that you want to put the >> reusable methods in modules? :-) >> > > See, that's my problem. I have no control over them. Let me explain. I'm > working on ActiveRecord-JDBC, and sorry to say, some features of JDBC > aren't really database independent (for example, DDL). So, my current > track is to include parts of the original implementation to avoid this > problem. Right now I have copied the source verbatim, but that is no > solution. I want AR-JDBC to recognize that it's being used with an > Oracle JDBC driver, and then include some parts of OracleAdapter, (but > only parts...) Will simple composition and delegation work? > -- > Ola Bini (http://ola-bini.blogspot.com) -- Posted via http://www.ruby-forum.com/.