Class: Asciidoctor::Extensions::ProcessorExtension

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

Overview

A specialization of the Extension proxy that additionally stores a reference to the Asciidoctor::Extensions::Processor#process method. By storing this reference, its possible to accommodate both concrete extension implementations and Procs.

Instance Attribute Summary collapse

Attributes inherited from Extension

#config, #instance, #kind

Instance Method Summary collapse

Constructor Details

#initialize(kind, instance, process_method = nil) ⇒ ProcessorExtension

Returns a new instance of ProcessorExtension.



686
687
688
689
# File 'lib/asciidoctor/extensions.rb', line 686

def initialize kind, instance, process_method = nil
  super kind, instance, instance.config
  @process_method = process_method || (instance.method :process)
end

Instance Attribute Details

#process_methodObject (readonly)



684
685
686
# File 'lib/asciidoctor/extensions.rb', line 684

def process_method
  @process_method
end