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 accomodate 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.



673
674
675
676
# File 'lib/asciidoctor/extensions.rb', line 673

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)



671
672
673
# File 'lib/asciidoctor/extensions.rb', line 671

def process_method
  @process_method
end