arity

.arity()

Returns the number of parameters this function takes. This does not include the block parameter.

formula = def( x, y )
    return x + y*2
end

parameters = formula.arity() // parameters is set to 2