Module: Metanorma::Plugin::Lutaml::LutamlDiagramBase
- Included in:
- LutamlDiagramBlock, LutamlDiagramBlockMacro, LutamlEaDiagramBlockMacro, LutamlFigureInlineMacro, LutamlTableInlineMacro
- Defined in:
- lib/metanorma/plugin/lutaml/lutaml_diagram_base.rb
Instance Method Summary collapse
Instance Method Details
#lutaml_file(_reader) ⇒ Object
27 28 29 |
# File 'lib/metanorma/plugin/lutaml/lutaml_diagram_base.rb', line 27 def lutaml_file(_reader) raise "Implement me!" end |
#process(parent, reader, attrs) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/metanorma/plugin/lutaml/lutaml_diagram_base.rb', line 15 def process(parent, reader, attrs) uml_document = ::Lutaml::Uml::Parsers::Dsl .parse(lutaml_file(parent.document, reader)) filename = generate_file(parent, reader, uml_document) through_attrs = generate_attrs(attrs) through_attrs["target"] = filename through_attrs["title"] = uml_document. create_image_block(parent, through_attrs) rescue StandardError => e abort(parent, reader, attrs, e.) end |