#include #include #include "v8_ref.h" #include "v8_func.h" #include "v8_template.h" #include "converters.h" using namespace v8; Handle RubyInvocationCallback(const Arguments& args) { VALUE code = (VALUE)External::Unwrap(args.Data()); if (NIL_P(code)) { return Null(); } else { VALUE* arguments = new VALUE[args.Length()]; for(int c=0;c val = args[c]; arguments[c] = V82RB(val); } VALUE result = rb_funcall2(code, rb_intern("call"), args.Length(), arguments); delete [] arguments; Handle convertedResult = RB2V8(result); return convertedResult ; } } VALUE v8_Template_Set(VALUE self, VALUE name, VALUE value) { HandleScope handles; Local