Let's say I have a method that has the following ...
def is_number?(a,b,c,d)
end
Is it possible to iterate over each argument passed in is_number?and execute what is inside the method?
For instance...
is_number?(1,3,"hello",5)
It will go through each argument, and if the argument of each argument is a number, it will return true, but in this case it will return false due to "hello".
I already know how to check if the input is a number, I just want to be able to check multiple arguments in one method.
source
share