From: arcadiorubiogarcia@... Date: 2007-11-01T05:10:12+09:00 Subject: Re: Generation of initialize Hi again, I'm trying to enhance the previous solution (shown again at the end). I'd like to call the initialize method of the superclass from the generated initialize. For the moment it's ok to call it without parameters. Simply placing super inside the method definition doesn't work. Can anyone explain me how to do it. Thanks in advance. def initialize_with(*params) define_method(:initialize) do |*args| if args.size != params.size then raise ArgumentError.new("wrong number of arguments"\ " (#{args.size} for #{params.size})") end params.zip(args) do |param, arg| instance_variable_set("@#{param}", arg) end end return params end