Class: Metanorma::Plugin::Lutaml::LutamlTableInlineMacro
- Inherits:
-
Asciidoctor::Extensions::InlineMacroProcessor
- Object
- Asciidoctor::Extensions::InlineMacroProcessor
- Metanorma::Plugin::Lutaml::LutamlTableInlineMacro
- Includes:
- LutamlDiagramBase
- Defined in:
- lib/metanorma/plugin/lutaml/lutaml_table_inline_macro.rb
Constant Summary collapse
- SUPPORTED_OPTIONS =
%w[class enum data_type].freeze
Instance Method Summary collapse
Methods included from LutamlDiagramBase
Instance Method Details
#process(parent, _target, attrs) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/metanorma/plugin/lutaml/lutaml_table_inline_macro.rb', line 13 def process(parent, _target, attrs) keyword = SUPPORTED_OPTIONS.find { |n| attrs[n] } entity_key = [keyword, attrs["package"], attrs[keyword]].compact.join(":") return if parent.document.attributes["lutaml_entity_id"].nil? xmi_id = parent.document.attributes["lutaml_entity_id"][entity_key] return unless xmi_id %(<xref target="section-#{xmi_id}"/>) end |