Class: Lutaml::Xsd::Spa::Svg::Config::Dimensions
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::Dimensions
- Defined in:
- lib/lutaml/xsd/spa/svg/config/dimensions.rb
Overview
Value object for dimension configuration
Instance Method Summary collapse
- #box_corner_radius ⇒ Object
- #box_height ⇒ Object
- #box_width ⇒ Object
-
#initialize(dimensions_hash) ⇒ Dimensions
constructor
A new instance of Dimensions.
- #spacing_horizontal ⇒ Object
- #spacing_indent ⇒ Object
- #spacing_vertical ⇒ Object
- #text_font_size ⇒ Object
- #text_icon_size ⇒ Object
- #text_offset_y ⇒ Object
- #text_small_font_size ⇒ Object
Constructor Details
#initialize(dimensions_hash) ⇒ Dimensions
Returns a new instance of Dimensions.
10 11 12 13 14 15 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 10 def initialize(dimensions_hash) @dimensions = dimensions_hash @box = BoxDimensions.new(@dimensions["box"] || {}) @spacing = SpacingDimensions.new(@dimensions["spacing"] || {}) @text = TextDimensions.new(@dimensions["text"] || {}) end |
Instance Method Details
#box_corner_radius ⇒ Object
25 26 27 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 25 def box_corner_radius @box.corner_radius end |
#box_height ⇒ Object
21 22 23 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 21 def box_height @box.height end |
#box_width ⇒ Object
17 18 19 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 17 def box_width @box.width end |
#spacing_horizontal ⇒ Object
29 30 31 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 29 def spacing_horizontal @spacing.horizontal end |
#spacing_indent ⇒ Object
37 38 39 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 37 def spacing_indent @spacing.indent end |
#spacing_vertical ⇒ Object
33 34 35 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 33 def spacing_vertical @spacing.vertical end |
#text_font_size ⇒ Object
45 46 47 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 45 def text_font_size @text.font_size end |
#text_icon_size ⇒ Object
53 54 55 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 53 def text_icon_size @text.icon_size end |
#text_offset_y ⇒ Object
41 42 43 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 41 def text_offset_y @text.offset_y end |
#text_small_font_size ⇒ Object
49 50 51 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 49 def text_small_font_size @text.small_font_size end |