1) I have a method
def self.createobj(api_key, amnt, commentstr, orderid, order_creation_date, orderfullfilmentdate)
.....
end
2) I want to create a error_str of all the parameters passed to this function ...
2.1) Something like
errorstr = "api_key: " + api_key.to_s + " amnt: " + amnt.to_s + " commentstr: " + commentstr.to_s + " orderid: " + orderid.to_s + " order_creation_date: " + order_creation_date.to_s + " orderfullfilmentdate: " + orderfullfilmentdate.to_s
2.2) So I created another method
def self.get_params_str(a)
str = ""
a.each do |a|
str = str + a.to_s
end
return str
end
2.3) So I call this new method from createobj. Something like
def self.createobj(api_key, amnt, commentstr, orderid, order_creation_date, orderfullfilmentdate)
errorstr = get_params_str(args)
.....
end
3) But I get error undefined local variable or method `args' for #. Shouldn't args have all parameters?
Please advice.