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 =
File.join( Gem::Specification.find_by_name("metanorma-plugin-lutaml").gem_dir, "lib", "metanorma", "plugin", "lutaml", "liquid_templates", "_klass_table.liquid" )
Instance Method Summary collapse
Instance Method Details
#process(parent, target, attrs) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/metanorma/plugin/lutaml/lutaml_klass_table_block_macro.rb', line 16 def process(parent, target, attrs) xmi_path = Utils.relative_file_path(parent.document, target) if attrs["template"] attrs["template"] = Utils.relative_file_path( parent.document, attrs["template"] ) end if attrs["guidance"] attrs["guidance"] = Utils.relative_file_path( parent.document, attrs["guidance"] ) end klass = ::Lutaml::XMI::Parsers::XML.serialize_generalization_by_name( xmi_path, attrs["name"], attrs["guidance"] ) render(klass, parent, attrs) end |