Class: Lutaml::Xsd::Spa::Svg::Config::ConnectorStyle
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::ConnectorStyle
- Defined in:
- lib/lutaml/xsd/spa/svg/config/connector_styles.rb
Overview
Individual connector style value object
Instance Attribute Summary collapse
-
#arrow_size ⇒ Object
readonly
Returns the value of attribute arrow_size.
-
#dash_pattern ⇒ Object
readonly
Returns the value of attribute dash_pattern.
-
#stroke_width ⇒ Object
readonly
Returns the value of attribute stroke_width.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #dashed? ⇒ Boolean
-
#initialize(style_hash) ⇒ ConnectorStyle
constructor
A new instance of ConnectorStyle.
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_size ⇒ Object (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_pattern ⇒ Object (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_width ⇒ Object (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 |
#type ⇒ Object (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
51 52 53 |
# File 'lib/lutaml/xsd/spa/svg/config/connector_styles.rb', line 51 def dashed? !@dash_pattern.nil? end |