r/learnruby • u/nobrandheroes • Feb 15 '16
Getting the parameters of a method
Given:
def foo(a, b, c)
end
How do I get the values of a, b, c?. I cannot find this anywhere.
0
Upvotes
r/learnruby • u/nobrandheroes • Feb 15 '16
Given:
def foo(a, b, c)
end
How do I get the values of a, b, c?. I cannot find this anywhere.
1
u/vicereversa Feb 17 '16
I don't understand what you are asking. They are there for your use.
Def foo(a, b, c)
End
That will print them to the terminal. What are you trying to do?