Package org.jruby.embed

Examples of org.jruby.embed.IsolatedScriptingContainer.addLoadPath()


  // System.setProperty( "jruby.debug.loadService", "true" );
  System.setProperty( "jruby.native.verbose", "true" );

  IsolatedScriptingContainer jruby = new IsolatedScriptingContainer();
  jruby.addLoadPath( Scripts.class.getClassLoader() );
  jruby.addGemPath( Gems.class.getClassLoader() );
 
        // run a script from LOAD_PATH
        String hello = (String) jruby.runScriptlet( "require 'hello'; Hello.say" );
        assertEquals( hello, "world" );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.