use of javax.xml.xpath.XPathFunctionException in project nokogiri by sparklemotion.
the class NokogiriXPathFunction method evaluate.
public Object evaluate(List args) throws XPathFunctionException {
if (args.size() != this.arity) {
throw new XPathFunctionException("arity does not match");
}
final Ruby runtime = this.handler.getRuntime();
ThreadContext context = runtime.getCurrentContext();
IRubyObject result = RuntimeHelpers.invoke(context, this.handler, this.name, fromObjectToRubyArgs(runtime, args));
return fromRubyToObject(runtime, result);
}
Aggregations