Is there a way to make a method that can accept a parameter, but can also be called without one, in which case the parameter is regarded nil
like the following?
some_func(variable)
some_func
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…