Package org.asciidoctor.jruby
Class AsciidoctorJRuby.Factory
- java.lang.Object
-
- org.asciidoctor.jruby.AsciidoctorJRuby.Factory
-
- Enclosing interface:
- AsciidoctorJRuby
public static final class AsciidoctorJRuby.Factory extends java.lang.Object
Factory for creating a new instance of Asciidoctor interface.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AsciidoctorJRuby
create()
Creates a new instance of Asciidoctor.static AsciidoctorJRuby
create(java.lang.ClassLoader classloader)
Creates a new instance of Asciidoctor and sets a specific classloader for the JRuby runtime to use.static AsciidoctorJRuby
create(java.lang.ClassLoader classloader, java.lang.String gemPath)
Creates a new instance of Asciidoctor and sets a specific classloader and gempath for the JRuby runtime to use.static AsciidoctorJRuby
create(java.lang.String gemPath)
Creates a new instance of Asciidoctor and sets GEM_PATH environment variable to provided gemPath.static AsciidoctorJRuby
create(java.util.List<java.lang.String> loadPaths)
Creates a new instance of Asciidoctor and sets loadPath to provided paths.static AsciidoctorJRuby
create(java.util.List<java.lang.String> loadPaths, java.lang.String gemPath)
Creates a new instance of Asciidoctor and sets loadPath to provided paths.
-
-
-
Method Detail
-
create
public static AsciidoctorJRuby create()
Creates a new instance of Asciidoctor.- Returns:
- Asciidoctor instance which uses JRuby to wraps Asciidoctor Ruby calls.
-
create
public static AsciidoctorJRuby create(java.lang.String gemPath)
Creates a new instance of Asciidoctor and sets GEM_PATH environment variable to provided gemPath. This method is mostly used in OSGi environments.- Parameters:
gemPath
- where gems are located.- Returns:
- Asciidoctor instance which uses JRuby to wraps Asciidoctor Ruby calls.
-
create
public static AsciidoctorJRuby create(java.util.List<java.lang.String> loadPaths)
Creates a new instance of Asciidoctor and sets loadPath to provided paths. This method is mostly used in OSGi environments.- Parameters:
loadPaths
- where Ruby libraries are located.- Returns:
- Asciidoctor instance which uses JRuby to wraps Asciidoctor Ruby calls.
-
create
public static AsciidoctorJRuby create(java.lang.ClassLoader classloader)
Creates a new instance of Asciidoctor and sets a specific classloader for the JRuby runtime to use. This method is for use in environments like OSGi. To initialize Asciidoctor in OSGi create the Asciidoctor instance like this:org.jruby.javasupport.JavaEmbedUtils.initialize(Arrays.asList("uri:classloader:/gems/asciidoctor-1.5.8/lib")); Asciidoctor asciidoctor = Asciidoctor.Factory.create(this.getClass().getClassLoader());
- Parameters:
classloader
-- Returns:
- Asciidoctor instance which uses JRuby to wraps Asciidoctor Ruby calls.
-
create
public static AsciidoctorJRuby create(java.lang.ClassLoader classloader, java.lang.String gemPath)
Creates a new instance of Asciidoctor and sets a specific classloader and gempath for the JRuby runtime to use. This method is for use in environments like OSGi. To initialize Asciidoctor in OSGi create the Asciidoctor instance like this:org.jruby.javasupport.JavaEmbedUtils.initialize(Arrays.asList("uri:classloader:/gems/asciidoctor-1.5.8/lib")); Asciidoctor asciidoctor = Asciidoctor.Factory.create(this.getClass().getClassLoader());
- Parameters:
classloader
-gemPath
-- Returns:
- Asciidoctor instance which uses JRuby to wraps Asciidoctor
-
create
public static AsciidoctorJRuby create(java.util.List<java.lang.String> loadPaths, java.lang.String gemPath)
Creates a new instance of Asciidoctor and sets loadPath to provided paths. The gem path of the Ruby instance is set to the gemPath parameter.- Parameters:
loadPaths
- where Ruby libraries are located.gemPath
- where gems are located.- Returns:
- Asciidoctor instance which uses JRuby to wraps Asciidoctor Ruby calls.
-
-