Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //get jruby engine
- ScriptEngine jruby = new ScriptEngineManager().getEngineByName("jruby");
- //process a ruby file
- jruby.eval(new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("/ruby/lti_outcome_util.rb"))));
- //call a method defined in the ruby source
- jruby.put("score", score);
- jruby.put("message_id", messageId);
- jruby.put("sourcedid", sourcedId);
- jruby.put("key", key);
- jruby.put("secret", secret);
- jruby.put("lis_outcome_service_url", lisOutcomeServiceUrl);
- String res = (String) jruby.eval("postScore($score, $message_id, $sourcedid, $key, $secret, $lis_outcome_service_url)");
Add Comment
Please, Sign In to add comment