Class: Archimate::Svg::Entity::DiagramModelReference
- Inherits:
-
RectEntity
- Object
- BaseEntity
- RectEntity
- Archimate::Svg::Entity::DiagramModelReference
- Defined in:
- lib/archimate/svg/entity/diagram_model_reference.rb
Instance Attribute Summary
Attributes inherited from BaseEntity
#background_class, #badge, #badge_bounds, #bounds_offset, #child, #entity, #text_bounds
Instance Method Summary collapse
-
#initialize(child, bounds_offset) ⇒ DiagramModelReference
constructor
A new instance of DiagramModelReference.
- #optional_link(xml, &block) ⇒ Object
Methods inherited from RectEntity
Methods included from Rect
Methods inherited from BaseEntity
#entity_badge, #entity_label, #group_attrs, #shape_style, #text_lines, #text_style, #to_svg
Constructor Details
#initialize(child, bounds_offset) ⇒ DiagramModelReference
Returns a new instance of DiagramModelReference.
7 8 9 10 11 12 |
# File 'lib/archimate/svg/entity/diagram_model_reference.rb', line 7 def initialize(child, bounds_offset) super @badge = "#archimate-diagram-model-reference-badge" @background_class = "archimate-diagram-model-reference-background" @entity = child.view_refs end |
Instance Method Details
#optional_link(xml, &block) ⇒ Object
14 15 16 17 18 |
# File 'lib/archimate/svg/entity/diagram_model_reference.rb', line 14 def optional_link(xml, &block) xml.a(href: "#{@entity.id}.svg") do block.call end end |