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.



577
578
579
580
581
# File 'lib/asciidoctor/extensions.rb', line 577

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

Instance Attribute Details

#nameObject



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

def name
  @name
end

Instance Method Details

#process(parent, target, attributes) ⇒ Object

Raises:

  • (::NotImplementedError)


583
584
585
# File 'lib/asciidoctor/extensions.rb', line 583

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