Package org.asciidoctor.jruby
Class AsciidoctorJRuby.Factory
java.lang.Object
org.asciidoctor.jruby.AsciidoctorJRuby.Factory
- Enclosing interface:
- AsciidoctorJRuby
Factory for creating a new instance of Asciidoctor interface.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AsciidoctorJRubycreate()Creates a new instance of Asciidoctor.static AsciidoctorJRubycreate(ClassLoader classloader) Creates a new instance of Asciidoctor and sets a specific classloader for the JRuby runtime to use.static AsciidoctorJRubycreate(ClassLoader classloader, String gemPath) Creates a new instance of Asciidoctor and sets a specific classloader and gempath for the JRuby runtime to use.static AsciidoctorJRubyCreates a new instance of Asciidoctor and sets GEM_PATH environment variable to provided gemPath.static AsciidoctorJRubyCreates a new instance of Asciidoctor and sets loadPath to provided paths.static AsciidoctorJRubyCreates a new instance of Asciidoctor and sets loadPath to provided paths.
-
Method Details
-
create
Creates a new instance of Asciidoctor.- Returns:
- Asciidoctor instance which uses JRuby to wraps Asciidoctor Ruby calls.
-
create
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
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
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
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
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.
-