Class: Metanorma::Plugin::Lutaml::LutamlKlassTableBlockMacro
- Inherits:
-
Asciidoctor::Extensions::BlockMacroProcessor
- Object
- Asciidoctor::Extensions::BlockMacroProcessor
- Metanorma::Plugin::Lutaml::LutamlKlassTableBlockMacro
- Defined in:
- lib/metanorma/plugin/lutaml/lutaml_klass_table_block_macro.rb
Constant Summary collapse
- DEFAULT_TEMPLATE_PATH =
File.join( Gem::Specification.find_by_name("metanorma-plugin-lutaml").gem_dir, "lib/metanorma/plugin/lutaml/liquid_templates/<NAME>.liquid", )
- DEFAULT_TABLE_TEMPLATE =
DEFAULT_TEMPLATE_PATH .gsub("<NAME>", "_klass_table")
- DEFAULT_ROW_TEMPLATE =
DEFAULT_TEMPLATE_PATH .gsub("<NAME>", "_klass_row")
- DEFAULT_ASSOC_ROW_TEMPLATE =
DEFAULT_TEMPLATE_PATH .gsub("<NAME>", "_klass_assoc_row")
Instance Method Summary collapse
Instance Method Details
#process(parent, target, attrs) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/metanorma/plugin/lutaml/lutaml_klass_table_block_macro.rb', line 26 def process(parent, target, attrs) result_path = Utils.relative_file_path(parent.document, target) gen = ::Lutaml::XMI::Parsers::XML.serialize_generalization_by_name( result_path, attrs["name"] ) render(gen, parent, attrs) end |