What is *args or *urls if I write a method like:
def test(*args)
@test = args
end
I have also seen *urls is it an array or? Like options are created with hash options = {}.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I believe this is to make the function variadic (i.e. the function’s arity is an arbitrary number of arguments).
The type is an Array.