我是Ruby和ROR的新手,每天都很喜欢它,所以这是我的问题,因为我不知道如何在google上搜索它(我已经尝试过了:)
我们有方法
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
所以我正在寻找的是将所有参数传递给方法的方法,而不是列出每个参数。由于这是Ruby,我假设有一种方法:)如果是java,我会列出它们:)
输出将为:
Method has failed, here are all method arguments {"Mario", "Super", 40, true, true}
https://stackoverflow.com/questions/9211813
复制相似问题