From: Chris Richards Date: 2007-11-26T18:20:11+09:00 Subject: Metaprogramming help I have created a module as follows which adds an initialize method to the class it is included in. The problem is that the initializer method could be easily overriden by the includer Class. Is there a way to ensure that the initialize method is run even though it may have been overriden?? module SomeModule def self.included(base) base.class_eval do attr_accessor :fields, :x_position, :y_position def initialize(x_position=0, y_position=0) @fields=self.class.xfields.clone self.y_position=y_position self.x_position=x_position for field in @fields eval "self."+field[:var] + " = field[:value]" end @fields = @fields.sort_by{|f| f[:order]} if @fields.find{|f| f[:order]} end end end end Any help is appreciated. Thanks, Chris -- Posted via http://www.ruby-forum.com/.