Как я могу выполнить http://php.net/manual/en/function.call-user-func-array.php в рубине?
Так что я могу сделать это:
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
Попробуйте взорвать массив
App.send(:foo, *args)