Raphael Bauduin wrote:
> Hi,
> 
> is it possible, in a module, to create an alias for a method of the 
> object including it?
> 
> module CKHTMLTableUser       alias_method :normal_init, :init    def init
>        if request["action"]
>            send("#{request['action']}_action")
>        end
>        normal_init
>    end
> end

module CKHTMLTableUser
   def self.included(cl)
     cl.class_eval do
       alias_method :normal_init, :init
       def init
         puts "init from CKHTMLTableUser"
         normal_init
       end
     end
   end
end

class C
#  include CKHTMLTableUser # This way won't work.
   def init
     puts "init from C"
   end
   include CKHTMLTableUser
end

C.new.init