有没有办法制作一个可以接受参数的方法,但也可以在没有参数的情况下调用,在这种情况下,参数nil如下所示?
nil
some_func(variable) some_func
ruby methods
methods ×1
ruby ×1