Class: Asciidoctor::Diagram::DiagramBlockMacroProcessor
- Inherits:
-
Extensions::BlockMacroProcessor
- Object
- Extensions::BlockMacroProcessor
- Asciidoctor::Diagram::DiagramBlockMacroProcessor
- Includes:
- DiagramProcessor
- Defined in:
- lib/asciidoctor-diagram/diagram_processor.rb
Overview
Base class for diagram block macro processors.
Direct Known Subclasses
AsciiToSvgBlockMacroProcessor, BarcodeBlockMacroProcessor, BpmnBlockMacroProcessor, BytefieldBlockMacroProcessor, D2BlockMacroProcessor, DbmlBlockMacroProcessor, DiagramsBlockMacroProcessor, DitaaBlockMacroProcessor, DpicBlockMacroProcessor, ErdBlockMacroProcessor, GnuplotBlockMacroProcessor, GraphvizBlockMacroProcessor, GraphvizPyBlockMacroProcessor, LilypondBlockMacroProcessor, MemeBlockMacroProcessor, MermaidBlockMacroProcessor, MscBlockMacroProcessor, NomnomlBlockMacroProcessor, PenroseBlockMacroProcessor, PikchrBlockMacroProcessor, PlantUmlBlockMacroProcessor, SaltBlockMacroProcessor, ShaapeBlockMacroProcessor, SmcatBlockMacroProcessor, StructurizrConvertBlockMacroProcessor, SvgBobBlockMacroProcessor, SymbolatorBlockMacroProcessor, SyntraxBlockMacroProcessor, TikZBlockMacroProcessor, UmletBlockMacroProcessor, VegaBlockMacroProcessor, WavedromBlockMacroProcessor
Constant Summary
Constants included from DiagramProcessor
Asciidoctor::Diagram::DiagramProcessor::IMAGE_PARAMS, Asciidoctor::Diagram::DiagramProcessor::TEXT_FORMATS
Class Method Summary collapse
Instance Method Summary collapse
- #apply_target_subs(parent, target) ⇒ Object
-
#create_source(parent, target, attributes) ⇒ FileSource
Creates a FileSource using target as the file name.
Methods included from DiagramProcessor
Class Method Details
.inherited(subclass) ⇒ Object
389 390 391 392 |
# File 'lib/asciidoctor-diagram/diagram_processor.rb', line 389 def self.inherited(subclass) subclass.use_dsl subclass.name_positional_attributes ['format'] end |
Instance Method Details
#apply_target_subs(parent, target) ⇒ Object
394 395 396 397 398 399 400 |
# File 'lib/asciidoctor-diagram/diagram_processor.rb', line 394 def apply_target_subs(parent, target) if target parent.normalize_system_path(parent.sub_attributes(target, :attribute_missing => 'warn')) else nil end end |
#create_source(parent, target, attributes) ⇒ FileSource
Creates a FileSource using target as the file name.
405 406 407 |
# File 'lib/asciidoctor-diagram/diagram_processor.rb', line 405 def create_source(parent, target, attributes) FileSource.new(self, parent, apply_target_subs(parent, target), attributes) end |