You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
498 B
Groovy
21 lines
498 B
Groovy
package org.xbib.gradle.plugin.asciidoctor.groovydsl.extensions
|
|
|
|
import org.asciidoctor.ast.Document
|
|
import org.asciidoctor.extension.DocinfoProcessor
|
|
|
|
class DelegatingDocinfoProcessor extends DocinfoProcessor {
|
|
|
|
private final Closure cl
|
|
|
|
DelegatingDocinfoProcessor(Map options, @DelegatesTo(DocinfoProcessor) Closure cl) {
|
|
super(options)
|
|
this.cl = cl
|
|
cl.delegate = this
|
|
}
|
|
|
|
@Override
|
|
String process(Document document) {
|
|
cl.call(document)
|
|
}
|
|
}
|