/**
* Invokes a function on a script instance
*/
public Object invokeTarget(final Object payload) throws InvocationTargetException {
RubyScriptInstance target = context.getTargetInstance();
return target.invokeFunction(functionName,
(Object[]) payload,
returnType);
}