Class: Archimate::Svg::Entity::Product

Inherits:
BaseEntity
  • Object
show all
Defined in:
lib/archimate/svg/entity/product.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 BaseEntity

#entity_badge, #entity_label, #group_attrs, #initialize, #optional_link, #shape_style, #text_lines, #text_style, #to_svg

Constructor Details

This class inherits a constructor from Archimate::Svg::Entity::BaseEntity

Instance Method Details

#entity_shape(xml, bounds) ⇒ Object



7
8
9
# File 'lib/archimate/svg/entity/product.rb', line 7

def entity_shape(xml, bounds)
  product_path(xml, bounds)
end

#product_path(xml, bounds) ⇒ Object



11
12
13
14
15
16
# File 'lib/archimate/svg/entity/product.rb', line 11

def product_path(xml, bounds)
  xml.g(class: background_class) do
    xml.rect(x: bounds.left, y: bounds.top, width: bounds.width, height: bounds.height, class: background_class, style: shape_style)
    xml.rect(x: bounds.left, y: bounds.top, width: bounds.width / 2.0, height: "8", class: "archimate-decoration")
  end
end