Class: Asciidoctor::Extensions::DocinfoProcessor
- 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
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ DocinfoProcessor
constructor
A new instance of DocinfoProcessor.
- #process(document) ⇒ Object
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
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 |