From: Bob Calco Date: 2002-06-22T04:11:23+09:00 Subject: RE: Mixin using append_features and class< err puts err end end end END end def remove_method( name ) instance_eval "undef #{name}" end end o = Object.new class << o include Adaptable # add Adaptable to this instance of the Object class end o.add_method :public, :fact, :n, <<-END if n == 0 then 1 else n * fact( n-1 ) end END o.fact( 5 ) #=> 120 o.remove_method :fact o.fact( 5 ) #=> (NoMethodError) ------------------------------------- This should anwer some of your questions, and open you eyes to more than a few possibilities. Enjoy! -- Bob Calco -----Original Message----- From: Philipp Meier [mailto:meier@meisterbohne.de] Sent: Friday, June 21, 2002 2:35 PM To: ruby-talk ML Subject: Mixin using append_features and class<