Class: Metanorma::Plugin::Lutaml::LutamlKlassTableBlockMacro
- Inherits:
-
Asciidoctor::Extensions::BlockMacroProcessor
- Object
- Asciidoctor::Extensions::BlockMacroProcessor
- Metanorma::Plugin::Lutaml::LutamlKlassTableBlockMacro
- Includes:
- Content, LutamlEaXmiBase
- 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" )
- CONTEXT_NAME =
"klass"
Constants included from LutamlEaXmiBase
Metanorma::Plugin::Lutaml::LutamlEaXmiBase::SUPPORTED_NESTED_MACRO, Metanorma::Plugin::Lutaml::LutamlEaXmiBase::XMI_INDEX_REGEXP
Constants included from XmiRenderer
XmiRenderer::DEFAULT_RENDER_INCLUDE, XmiRenderer::LIQUID_INCLUDE_PATH, XmiRenderer::RENDER_STYLES_INCLUDES, XmiRenderer::RENDER_STYLE_ATTRIBUTE
Constants included from XmiCache
XmiCache::LUTAML_DOC_CACHE, XmiCache::UML_DOC_CACHE
Constants included from Utils
Instance Method Summary collapse
-
#process(parent, target, attrs) ⇒ Object
rubocop:disable Metrics/AbcSize,Metrics/MethodLength.
Methods included from XmiRenderer
#get_name_path, #get_template, #model_representation, #render_table, #template, #template_path
Methods included from XmiContextBuilder
#create_context_object, #create_default_context_object, #fill_in_diagrams_attributes, #fill_in_entities_refs_attributes
Methods included from XmiPackageFilter
#filter_out_all_skipped_packages, #package_entities, #package_hash, #package_level, #select_supplied_packages_by_pattern, #sort_and_filter_out_packages
Methods included from XmiConfig
#config_entity_regexp, #get_guidance, #parse_yaml_config_file
Methods included from XmiCache
#build_drop_options, #build_uml_document, #find_packaged_enum, #find_packaged_klass, #find_packaged_klass_by_path, #find_uml_node_by_xmi_id, #load_ea_extensions, #lutaml_document_from_file_or_cache, #match_parent_chain?, #serialize_enum_drop_by_name, #serialize_klass_drop_by_name
Methods included from Utils
create_liquid_environment, error_signature, load_express_from_folder, load_express_from_index, load_express_repo_from_cache, load_express_repo_from_path, load_express_repositories, notify_render_errors, parse_document_express_indexes, processed_lines, relative_file_path, render_liquid_string, save_express_repo_to_cache
Instance Method Details
#process(parent, target, attrs) ⇒ Object
rubocop:disable Metrics/AbcSize,Metrics/MethodLength
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/metanorma/plugin/lutaml/lutaml_klass_table_block_macro.rb', line 22 def process(parent, target, attrs) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength xmi_path = get_xmi_path(parent, target, attrs) path = get_name_path(attrs) guidance = nil if attrs["guidance"] guidance = get_guidance(parent.document, attrs["guidance"]) end klass = serialize_klass_drop_by_name(xmi_path, path, parent.document, guidance) render_table(klass, CONTEXT_NAME, parent, attrs) end |