Class: Archimate::Svg::Entity::DiagramModelReference

Inherits:
RectEntity show all
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

Methods inherited from RectEntity

#entity_shape

Methods included from Rect

#rect_path

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



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