From: Pit Capitain Date: 2009-02-15T23:49:57+09:00 Subject: Re: Exercise in Frustration 2009/2/15 Trans : > Great. However, I also want the end-user of this library to be able > effect all classes and modules with a single extend (or include) as > well, if they so choose. Eg. > > class Module > include MyEnhancement > end Is the problem here that Module defines its own #attr_accessor shadowing the new one? > It would also be nice if the module's methods can be made to work from > the toplevel (main): > > extend MyEnhancement What should #attr_accessor do in the context of the toplevel object? Maybe you can show us another example? > In attempting to implement this, I have found myself resorting to > unDRY, ugly, hacky code, that always seems to have a bug in it > somewhere. It's infuriating. This is not how programming Ruby is > supposed to be! Hmm, I think this will be hacky indeed. Regards, Pit