class Asciidoctor::Extensions::Processor

AST nodes, such as Block and Inline, and for parsing child content.
Instances of the Processor class provide convenience methods for creating
the configuration is accessed using the {Processor#config} instance variable.
Hash can be passed to the initializer. Once the processor is initialized,
and is only consulted inside the initializer. An overriding configuration
style of default configuration is specific to the native Ruby environment
configuration options defined using the {Processor.option} method. This
This class provides access to a class-level Hash for holding default
Public: An abstract base class for document and syntax processors.

def config

Returns a configuration [Hash]

Public: Get the static configuration for this processor class.
def config
  @config ||= {}
end

def create_block parent, context, source, attrs, opts = {}

def create_block parent, context, source, attrs, opts = {}
  Block.new parent, context, { :source => source, :attributes => attrs }.merge(opts)
end

def create_image_block parent, attrs, opts = {}

def create_image_block parent, attrs, opts = {}
  create_block parent, :image, nil, attrs, opts
end

def create_inline parent, context, text, opts = {}

def create_inline parent, context, text, opts = {}
  Inline.new parent, context, text, opts
end

def initialize config = {}

def initialize config = {}
  @config = self.class.config.merge config
end

def option key, default_value

Returns nothing

option :contexts, [:open, :paragraph]

Examples

applied to all instances of this processor.
Public: Assigns a default value for the specified option that gets
def option key, default_value
  config[key] = default_value
end

def parse_content parent, content, attributes = {}

QUESTION is parse_content the right method name? should we wrap in open block automatically?
--
Returns nothing

Public: Parses blocks in the content and attaches the block to the parent.
def parse_content parent, content, attributes = {}
  reader = (content.is_a? Reader) ? reader : (Reader.new content)
  while reader.has_more_lines?
    block = Parser.next_block(reader, parent, attributes)
    parent << block if block
  end
  nil
end

def process *args

def process *args
  raise ::NotImplementedError
end

def update_config config

def update_config config
  @config.update config
end

def use_dsl

Returns nothing

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

Include the DSL class for this processor into this processor class or instance.
def use_dsl
  if self.name.nil_or_empty?
    # NOTE contants(false) doesn't exist in Ruby 1.8.7
    #include const_get :DSL if constants(false).grep :DSL
    include const_get :DSL if constants.grep :DSL
  else
    # NOTE contants(false) doesn't exist in Ruby 1.8.7
    #extend const_get :DSL if constants(false).grep :DSL
    extend const_get :DSL if constants.grep :DSL
  end
end