Class: Asciidoctor::Diagram::DiagramBlockProcessor

Inherits:
Extensions::BlockProcessor
  • Object
show all
Includes:
DiagramProcessor
Defined in:
lib/asciidoctor-diagram/diagram_processor.rb

Overview

Base class for diagram block processors.

Constant Summary

Constants included from DiagramProcessor

Asciidoctor::Diagram::DiagramProcessor::IMAGE_PARAMS, Asciidoctor::Diagram::DiagramProcessor::TEXT_FORMATS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DiagramProcessor

included, #process

Class Method Details

.inherited(subclass) ⇒ Object



370
371
372
373
374
375
# File 'lib/asciidoctor-diagram/diagram_processor.rb', line 370

def self.inherited(subclass)
  subclass.use_dsl
  subclass.name_positional_attributes ['target', 'format']
  subclass.contexts [:listing, :literal, :open]
  subclass.content_model :simple
end

Instance Method Details

#create_source(parent_block, reader, attributes) ⇒ ReaderSource

Creates a ReaderSource from the given reader.

Returns:



380
381
382
# File 'lib/asciidoctor-diagram/diagram_processor.rb', line 380

def create_source(parent_block, reader, attributes)
  ReaderSource.new(self, parent_block, reader, attributes)
end