From: Evan Senter Date: 2009-11-24T09:05:35+09:00 Subject: Re: How to alias_method_chain initialize from a mixin. I explored your idea of using inheritance a bit further, and though it's not entirely transparent to the consuming class (super has to be called) it is a clean implementation, and would look something like this: class A def initialize(&block) @_original_self = block.binding.eval("self") instance_eval(&block) if block_given? remove_instance_variable :@_original_self finish_init if defined? :finish_init end def print_me_a p "print_me_a" end def method_missing(name, *args, &block) @_original_self ? @_original_self.send(name, *args, &block) : super end end class B < A def initialize super end def finish_init p "finish_init" end def print_me_b p "print_me_b" end end class C def self.run B.new do print_me_a print_me_b print_me_c end end def self.print_me_c p "print_me_c" end end b = C.run #=> "print_me_a" #=> "print_me_b" #=> "print_me_c" #=> "finish_init" Thanks for the input, it was helpful! -- Posted via http://www.ruby-forum.com/.