Class Asciidoctor::Extensions::Processor
In: lib/asciidoctor/extensions.rb
Parent: Object

Public: An abstract base class for document and syntax processors.

This class provides access to a class-level Hash for holding default configuration options defined using the {Processor.option} method. This style of default configuration is specific to the native Ruby environment and is only consulted inside the initializer. An overriding configuration Hash can be passed to the initializer. Once the processor is initialized, the configuration is accessed using the {Processor#config} instance variable.

Instances of the Processor class provide convenience methods for creating AST nodes, such as Block and Inline, and for parsing child content.

Methods

External Aliases

use_dsl -> extend_dsl
use_dsl -> include_dsl

Attributes

config  [R]  Public: Get the configuration Hash for this processor instance.

Public Class methods

Public: Get the static configuration for this processor class.

Returns a configuration [Hash]

Public: Assigns a default value for the specified option that gets applied to all instances of this processor.

Examples

  option :contexts, [:open, :paragraph]

Returns nothing

Include the DSL class for this processor into this processor class or instance.

This method automatically detects whether to use the include or extend keyword based on what is appropriate.

NOTE Inspiration for this DSL design comes from corcoran.io/2013/09/04/simple-pattern-ruby-dsl/

Returns nothing

Public Instance methods

Public: Parses blocks in the content and attaches the block to the parent.

Returns nothing

[Validate]