From: itsme213 Date: 2005-01-30T09:59:26+09:00 Subject: Re: Run-time parameterized modules - ruby style? "Ilmari Heikkinen" wrote > > If the generated module did not include M, what would be a good way of > > keeping the instantiated M[param] in sync with changes in M? e.g. new > > methods are added to M, or an M method is re-defined? > > One would usually use include for that, yes. If you don't want the > generated > module to be related to M, it shouldn't care about changes to M anyhow, > no? It is related, but not by inclusion e.g. the generated module may put wrappers around or re-name M's methods. I don't want M's methods to be callable or visible in classes that include the generated module. But I would like to propagate changes to M into the corresponding wrappers. I'll look again at hooks in Module, like #method_added and #method_removed.