Class: Asciidoctor::Extensions::MacroProcessor

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

Direct Known Subclasses

BlockMacroProcessor, InlineMacroProcessor

Instance Attribute Summary collapse

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(name = nil, config = {}) ⇒ MacroProcessor

Returns a new instance of MacroProcessor.



590
591
592
593
594
# File 'lib/asciidoctor/extensions.rb', line 590

def initialize name = nil, config = {}
  super config
  @name = name || @config[:name]
  @config[:content_model] ||= :attributes
end

Instance Attribute Details

#nameObject



588
589
590
# File 'lib/asciidoctor/extensions.rb', line 588

def name
  @name
end

Instance Method Details

#process(parent, target, attributes) ⇒ Object

Raises:

  • (::NotImplementedError)


596
597
598
# File 'lib/asciidoctor/extensions.rb', line 596

def process parent, target, attributes
  raise ::NotImplementedError, %(#{MacroProcessor} subclass #{self.class} must implement the ##{__method__} method)
end