Class: Metanorma::Plugin::Lutaml::LutamlEaDiagramBlockMacro
- Inherits:
-
Asciidoctor::Extensions::BlockMacroProcessor
- Object
- Asciidoctor::Extensions::BlockMacroProcessor
- Metanorma::Plugin::Lutaml::LutamlEaDiagramBlockMacro
- Includes:
- LutamlDiagramBase, LutamlEaXmiBase
- Defined in:
- lib/metanorma/plugin/lutaml/lutaml_ea_diagram_block_macro.rb
Constant Summary
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
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
Methods included from LutamlDiagramBase
Instance Method Details
#process(parent, _target, attrs) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/metanorma/plugin/lutaml/lutaml_ea_diagram_block_macro.rb', line 14 def process(parent, _target, attrs) orig_doc = get_original_document(parent, attrs["index"]) diagram = fetch_diagram_by_name(orig_doc, attrs) return if diagram.nil? through_attrs = generate_attrs(attrs) through_attrs["target"] = img_src_path(parent.document, attrs, diagram) through_attrs["title"] = diagram.name create_image_block(parent, through_attrs) end |