Class: Lutaml::Xsd::Spa::Svg::Config::BoxDimensions

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

Overview

Box dimension value object

Instance Attribute Summary collapse

Instance Method Summary collapse

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_radiusObject (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

#heightObject (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

#widthObject (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