Guest

Untitled

By: a guest on Jan 28th, 2012  |  syntax: None  |  size: 0.39 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. _rubyRuntime = Ruby.newInstance();
  2. _rubyRuntime.evalScriptlet(String.format("require '%s'",filename));
  3. Object rfj = _rubyRuntime.evalScriptlet(String.format("%s.new",serviceClassName, serviceName));
  4. rfj = org.jruby.javasupport.JavaEmbedUtils.rubyToJava(_rubyRuntime,
  5.                      (org.jruby.runtime.builtin.IRubyObject) rfj,
  6.                       SampleService.class);
  7. _service = (SampleService)rfj;