I don't really want to write the names out! and I want it to be general
to apply to other methods in the wsdl amazon series.
but I like your idea, and it almost works, much cleaner way of passing
the parameters.
array_of_names.index(key) is nil in my case... I have to figure out
why. but I can use my own code for this if I don't find it. Anyway,
thank you so much for your time and ideas.
def namedrequest(fxname,hash)
nameinfo=eval(fxname).new.inspect
array_of_names=nameinfo.scan(/@(\w+)=/)
array_of_arguments=Array.new(array_of_names.length,'')
hash.keys.each{ |key|
array_of_arguments[array_of_names.index(key)]=hash[key]
}
command=fxname.slice(0,1).downcase+fxname.slice(1,fxname.length)+"="+fxname+".new(*array_of_arguments)"
p command
eval(command)
end