Class: Lutaml::Xsd::Spa::Svg::Config::TextDimensions
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::TextDimensions
- Defined in:
- lib/lutaml/xsd/spa/svg/config/dimensions.rb
Overview
Text dimension value object
Instance Attribute Summary collapse
-
#font_size ⇒ Object
readonly
Returns the value of attribute font_size.
-
#icon_size ⇒ Object
readonly
Returns the value of attribute icon_size.
-
#offset_y ⇒ Object
readonly
Returns the value of attribute offset_y.
-
#small_font_size ⇒ Object
readonly
Returns the value of attribute small_font_size.
Instance Method Summary collapse
-
#initialize(text_hash) ⇒ TextDimensions
constructor
A new instance of TextDimensions.
Constructor Details
#initialize(text_hash) ⇒ TextDimensions
Returns a new instance of TextDimensions.
84 85 86 87 88 89 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 84 def initialize(text_hash) @offset_y = text_hash["offset_y"] || 20 @font_size = text_hash["font_size"] || 14 @small_font_size = text_hash["small_font_size"] || 10 @icon_size = text_hash["icon_size"] || 16 end |
Instance Attribute Details
#font_size ⇒ Object (readonly)
Returns the value of attribute font_size.
82 83 84 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 82 def font_size @font_size end |
#icon_size ⇒ Object (readonly)
Returns the value of attribute icon_size.
82 83 84 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 82 def icon_size @icon_size end |
#offset_y ⇒ Object (readonly)
Returns the value of attribute offset_y.
82 83 84 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 82 def offset_y @offset_y end |
#small_font_size ⇒ Object (readonly)
Returns the value of attribute small_font_size.
82 83 84 |
# File 'lib/lutaml/xsd/spa/svg/config/dimensions.rb', line 82 def small_font_size @small_font_size end |