Class: Lutaml::Xsd::Spa::Svg::Renderers::TypeRenderer
- Inherits:
-
ComponentRenderer
- Object
- ComponentRenderer
- Lutaml::Xsd::Spa::Svg::Renderers::TypeRenderer
- Defined in:
- lib/lutaml/xsd/spa/svg/renderers/type_renderer.rb
Overview
Renders XSD type components (complexType, simpleType)
Instance Attribute Summary
Attributes inherited from ComponentRenderer
Instance Method Summary collapse
Methods inherited from ComponentRenderer
Constructor Details
This class inherits a constructor from Lutaml::Xsd::Spa::Svg::ComponentRenderer
Instance Method Details
#render(component_data, box) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/lutaml/xsd/spa/svg/renderers/type_renderer.rb', line 12 def render(component_data, box) name = component_data["name"] rule = config.component_rule("type") content = if rule.clickable? create_link(semantic_uri("types", name)) do render_box_and_text(box, name, rule, component_data) end else render_box_and_text(box, name, rule, component_data) end Utils::SvgBuilder.group({ class: "type-box" }) { content } end |