From: Michael Granger Date: 2003-09-12T12:02:33+09:00 Subject: Re: problem with Module#append_features On Monday, September 8, 2003, at 01:54 PM, Dan Doel wrote: > Here's some black magic to do something like you want to do. If > there's an easier way, I'm sure > someone will post it as a follow-up to my message. :) > > [...] How about: module Bar def initialize( *args ) puts "Initializing the M of #{self.inspect}" end end class Foo include Bar def initialize( *args ) puts "Initializing #{self.inspect}" super end end f = Foo::new # Output: # verrin pts/ttyp1 [~] # 3/502 {0}$ ruby -v ~/source/experiments/inimod.rb # ruby 1.8.0 (2003-08-22) [powerpc-darwin] # Initializing # # Initializing the M of # -- Michael Granger Rubymage, Believer, Architect The FaerieMUD Consortium