루비에서 http://php.net/manual/en/function.call-user-func-array.php을 어떻게 달성 할 수 있습니까?루비에서`call_user_func_array`를 달성하기
그래서 나는이 작업을 수행 할 수 있습니다
class App
def foo(a,b)
puts a + b
end
def bar
args = [1,2]
App.send(:foo, args) # doesn't work
App.send(:foo, args[0], args[1]) # does work, but does not scale
end
end
폭발보십시오. –