Ruby 和 ROR 的新手,每天都喜欢它,所以这里是我的问题,因为我不知道如何谷歌它(我已经尝试过:)
我们有办法
def foo(first_name, last_name, age, sex, is_plumber)
# some code
# error happens here
logger.error "Method has failed, here are all method arguments #{SOMETHING}"
end
So what I am looking for way to get all arguments passed to method, without listing each one. Since this is Ruby I assume there is a way :) if it was java I would just list them :)
产出将是:
Method has failed, here are all method arguments {"Mario", "Super", 40, true, true}