Login  Register

Re: Include with Glob expression

Posted by asotobu on Jul 01, 2013; 9:05am
URL: https://discuss.asciidoctor.org/Include-with-Glob-expression-tp357p365.html

And now that you comment the extension point, one question related with asciidoctor-java-integration project, and because Guillaume is so interested too, maybe he could give us his opinion too:

do you think that extensions should be provided to asciidoctor-java-integration as Ruby class name, and then Ruby code of extension should be in Java classpath, so in fact Java users should implement the extensions in Ruby.

or we can write an extension in Java, and then from Asciidoctor Ruby code, Java code is executed. We could define a common interface with a method called process. Then the implementation class is also passed to register_handler method, and then in Ruby code we could check if we are in a JRuby environment and if the given class is an instance of common interface, and then only in that case the extension code is registered and executed when it is required.

Also I am thinking that it would be better offer both options, but I don't know the difficulties from the point of view of Asciidoctor project.

What do you think?