Class: Asciidoctor::Diagram::StructurizrBlockMacroProcessor
- Inherits:
-
Extensions::BlockMacroProcessor
- Object
- Extensions::BlockMacroProcessor
- Asciidoctor::Diagram::StructurizrBlockMacroProcessor
- Defined in:
- lib/asciidoctor-diagram/structurizr/extension.rb
Instance Method Summary collapse
-
#initialize(name = nil, config = nil) ⇒ StructurizrBlockMacroProcessor
constructor
A new instance of StructurizrBlockMacroProcessor.
- #process(parent, target, attributes) ⇒ Object
Constructor Details
#initialize(name = nil, config = nil) ⇒ StructurizrBlockMacroProcessor
Returns a new instance of StructurizrBlockMacroProcessor.
37 38 39 40 41 |
# File 'lib/asciidoctor-diagram/structurizr/extension.rb', line 37 def initialize(name = nil, config = nil) super @structurizr = StructurizrConvertBlockMacroProcessor.new(name) @renderers = Renderers.new(name) end |
Instance Method Details
#process(parent, target, attributes) ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/asciidoctor-diagram/structurizr/extension.rb', line 43 def process parent, target, attributes structurizr_attrs = attributes.dup structurizr_attrs['format'] = 'txt' renderer_block = @structurizr.process(parent, target, structurizr_attrs) @renderers.get_renderer(BasicSource.new(self, parent, attributes)).process(parent, renderer_block, attributes) end |