Class: Asciidoctor::Extensions::BlockMacroProcessor

Inherits:
MacroProcessor show all
Defined in:
lib/asciidoctor/extensions.rb

Overview

BlockMacroProcessors are used to handle block macros that have a custom name.

If the process method returns an instance of Block, the content model of that Block is :compound, and the Block contains at least one line, the parser will parse those lines into blocks an assigned them to the returned block.

BlockMacroProcessor implementations must extend BlockMacroProcessor.

API:

  • public

Constant Summary collapse

DSL =

API:

  • public

MacroProcessorDsl

Instance Attribute Summary

Attributes inherited from Processor

#config

Instance Method Summary collapse

Methods inherited from MacroProcessor

#initialize, #process

Methods inherited from Processor

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

Constructor Details

This class inherits a constructor from Asciidoctor::Extensions::MacroProcessor

Instance Method Details

#nameObject

Raises:

API:

  • public



612
613
614
615
# File 'lib/asciidoctor/extensions.rb', line 612

def name
  raise ::ArgumentError, %(invalid name for block macro: #{@name}) unless MacroNameRx.match? @name.to_s
  @name
end