user3114054
user3114054

Reputation:

I don't understand this syntax

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

Answers (1)

Alex Wayne
Alex Wayne

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

Related Questions