Question

In Ruby, I know that Method#arity will return a value representing the number of arguments accepted by a method, however I do not know why it is called arity. Can anyone provide some insight into why it would exist in such a seemingly random namespace? Also, how do you pronounce it?

Was it helpful?

Solution

Because that's actually the name for it. http://en.wikipedia.org/wiki/Arity

I pronounce it AIR-i-TEE like in polarity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top