Class: Lutaml::Xsd::Spa::Svg::Config::BoxDimensions
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::BoxDimensions
- Defined in:
- lib/lutaml/xsd/spa/svg/config/dimensions.rb
Overview
Box dimension value object
Instance Attribute Summary collapse
-
#corner_radius ⇒ Object
readonly
Returns the value of attribute corner_radius.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(box_hash) ⇒ BoxDimensions
constructor
A new instance of BoxDimensions.
Constructor Details
#initialize(box_hash) ⇒ BoxDimensions
Returns a new instance of BoxDimensions.
62 63 64 65 66 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 62 def initialize(box_hash) @width = box_hash["width"] || 120 @height = box_hash["height"] || 30 @corner_radius = box_hash["corner_radius"] || 5 end |
Instance Attribute Details
#corner_radius ⇒ Object (readonly)
Returns the value of attribute corner_radius.
60 61 62 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 60 def corner_radius @corner_radius end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
60 61 62 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 60 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
60 61 62 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 60 def width @width end |