class Asciidoctor::Extensions::Registry
def preprocessor *args, &block
Returns the [Extension] stored in the registry that proxies the
end
end
...
process do |doc, reader|
preprocessor do
# as a method block
preprocessor 'FrontMatterPreprocessor'
# as a name of a Preprocessor subclass
preprocessor FrontMatterPreprocessor.new
# as an instance of a Preprocessor subclass
preprocessor FrontMatterPreprocessor
# as a Preprocessor subclass
Examples
first argument to this method.
Unless the Preprocessor is passed as the method block, it must be the
* A method block (i.e., Proc) that conforms to the Preprocessor contract
* The String name of a Preprocessor subclass
* An instance of a Preprocessor subclass
* A Preprocessor subclass
The Preprocessor may be one of four types:
the AsciiDoc source before parsing begins.
Public: Registers a {Preprocessor} with the extension registry to process
def preprocessor *args, &block add_document_processor :preprocessor, args, &block end