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" )
Instance Method Summary collapse
Instance Method Details
#process(parent, target, attrs) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/metanorma/plugin/lutaml/lutaml_klass_table_block_macro.rb', line 20 def process(parent, target, attrs) xmi_path = Utils.relative_file_path(parent.document, target) if attrs["tmpl_folder"] attrs["tmpl_folder"] = Utils.relative_file_path( parent.document, attrs["tmpl_folder"] ) end gen = ::Lutaml::XMI::Parsers::XML.serialize_generalization_by_name( xmi_path, attrs["name"] ) render(gen, parent, attrs) end |