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.



568
569
570
571
572
# File 'lib/asciidoctor/extensions.rb', line 568

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

Instance Attribute Details

#nameObject



566
567
568
# File 'lib/asciidoctor/extensions.rb', line 566

def name
  @name
end

Instance Method Details

#process(parent, target, attributes) ⇒ Object

Raises:

  • (::NotImplementedError)


574
575
576
# File 'lib/asciidoctor/extensions.rb', line 574

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