I have an array of the arguments that a function is taking, the length of the array can change.
i want to call the function with the amount of arguments that the array have, how can i do this in ruby.
The array can have a lot of arguments so some kind of a if/case statement would not work.
array = ["one","two","tree","four", "five"]
def callFunction(a)
callAnotherFunction(a[0],a[1],a[2],a[3],a[4])
end
I want to use some kind of a loop to send the correct amount of parameters. the callAnotherFunction function should be called with the amount of arguments that the array have. the array will always have the correct amount of arguments.