Reputation:
I just ran into this syntax in my studies. Does a space before and after values indicate that I can pass multiple values into this argument?
def no_odds( values )
Upvotes: 0
Views: 68
Reputation: 187034
Nope. Spaces are simply allowed in argument lists.
# all identical
def foo(bar,baz); end
def foo(bar, baz); end
def foo( bar, baz ); end
def foo( bar , baz ); end
No magic here, just style. And most ruby I've seen uses the def foo(bar, baz)
style.
Upvotes: 2