Class: Metanorma::Plugin::Lutaml::LutamlUmlAttributesTablePreprocessor

Inherits:
Asciidoctor::Extensions::Preprocessor
  • Object
show all
Defined in:
lib/metanorma/plugin/lutaml/lutaml_uml_attributes_table_preprocessor.rb

Overview

Macro for quick rendering of datamodel attributes/values table

@example [lutaml_uml_attributes_table,path/to/lutaml,EntityName]

Constant Summary collapse

MARCO_REGEXP =
/\[lutaml_uml_attributes_table,([^,]+),?([^,]+),?(.+?)?\]/

Instance Method Summary collapse

Instance Method Details

#process(document, reader) ⇒ Object

search document for block ‘datamodel_attributes_table`

read include derectives that goes after that in block and transform
into yaml2text blocks


21
22
23
24
# File 'lib/metanorma/plugin/lutaml/lutaml_uml_attributes_table_preprocessor.rb', line 21

def process(document, reader)
  input_lines = reader.readlines.to_enum
  Asciidoctor::Reader.new(processed_lines(document, input_lines))
end