de.viaboxx.gemsloader
Class GemLoader

java.lang.Object
  extended by de.viaboxx.gemsloader.GemLoader

public class GemLoader
extends Object

Provides a convenient way to create a load path config suitable for a ScriptingContainer instance that is able to access gems packaged with jruby-gems-plugin.


Constructor Summary
GemLoader()
           
 
Method Summary
 org.jruby.RubyInstanceConfig configWithGems()
          Creates a config with load paths adjusted to make gems discovery possible.
 List<String> loadPaths()
          Creates a list of paths needed for a ScriptingContainer to be able to access gems bundled using the jruby-gems-plugin maven plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GemLoader

public GemLoader()
Method Detail

configWithGems

public org.jruby.RubyInstanceConfig configWithGems()
                                            throws IOException
Creates a config with load paths adjusted to make gems discovery possible.

Returns:
Throws:
IOException

loadPaths

public List<String> loadPaths()
                       throws IOException
Creates a list of paths needed for a ScriptingContainer to be able to access gems bundled using the jruby-gems-plugin maven plugin.

Returns:
A list of path strings pointing to bundled gem roots.
Throws:
IOException - If accessing a bundled gem fails despite it was mentioned in one of the gems-in-jar/gems-in-jar.properties files found in the classpath.


Copyright © 2012. All Rights Reserved.