Class: Lutaml::Xsd::Spa::Svg::Config::ConnectorStyle

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xsd/spa/svg/config/connector_styles.rb

Overview

Individual connector style value object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(style_hash) ⇒ ConnectorStyle

Returns a new instance of ConnectorStyle.



44
45
46
47
48
49
# File 'lib/lutaml/xsd/spa/svg/config/connector_styles.rb', line 44

def initialize(style_hash)
  @type = style_hash["type"] || "hollow_triangle"
  @stroke_width = style_hash["stroke_width"] || 2
  @arrow_size = style_hash["arrow_size"] || 8
  @dash_pattern = style_hash["dash_pattern"]
end

Instance Attribute Details

#arrow_sizeObject (readonly)

Returns the value of attribute arrow_size.



42
43
44
# File 'lib/lutaml/xsd/spa/svg/config/connector_styles.rb', line 42

def arrow_size
  @arrow_size
end

#dash_patternObject (readonly)

Returns the value of attribute dash_pattern.



42
43
44
# File 'lib/lutaml/xsd/spa/svg/config/connector_styles.rb', line 42

def dash_pattern
  @dash_pattern
end

#stroke_widthObject (readonly)

Returns the value of attribute stroke_width.



42
43
44
# File 'lib/lutaml/xsd/spa/svg/config/connector_styles.rb', line 42

def stroke_width
  @stroke_width
end

#typeObject (readonly)

Returns the value of attribute type.



42
43
44
# File 'lib/lutaml/xsd/spa/svg/config/connector_styles.rb', line 42

def type
  @type
end

Instance Method Details

#dashed?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/lutaml/xsd/spa/svg/config/connector_styles.rb', line 51

def dashed?
  !@dash_pattern.nil?
end