Class: Asciidoctor::Extensions::DocinfoProcessor

Inherits:
Processor
  • Object
show all
Defined in:
lib/asciidoctor/extensions.rb

Overview

DocinfoProcessors are used to add additional content to the header and/or footer of the generated document.

The placement of docinfo content is controlled by the converter.

DocinfoProcessors implementations must extend DocinfoProcessor. If a location is not specified, the DocinfoProcessor is assumed to add content to the header.

Constant Summary collapse

DSL =
DocinfoProcessorDsl

Instance Attribute Summary

Attributes inherited from Processor

#config

Instance Method Summary collapse

Methods inherited from Processor

config, #create_block, #create_image_block, #create_inline, #create_list, #create_list_item, #create_section, enable_dsl, option, #parse_attributes, #parse_content, #update_config

Constructor Details

#initialize(config = {}) ⇒ DocinfoProcessor

Returns a new instance of DocinfoProcessor.



487
488
489
490
# File 'lib/asciidoctor/extensions.rb', line 487

def initialize config = {}
  super config
  @config[:location] ||= :head
end

Instance Method Details

#process(document) ⇒ Object

Raises:

  • (::NotImplementedError)


492
493
494
# File 'lib/asciidoctor/extensions.rb', line 492

def process document
  raise ::NotImplementedError, %(#{DocinfoProcessor} subclass #{self.class} must implement the ##{__method__} method)
end