Class: Uniword::ParagraphBorderSide

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/uniword/paragraph_border.rb

Overview

Represents a single paragraph border side

Constant Summary collapse

STYLES =

Border styles matching OOXML specification

%w[
  single thick double dotted dashed
  dotDash dotDotDash triple
  thinThickSmallGap thickThinSmallGap
  thinThickThinSmallGap thinThickMediumGap
  thickThinMediumGap thinThickThinMediumGap
  thinThickLargeGap thickThinLargeGap
  thinThickThinLargeGap wave doubleWave
  dashSmallGap dashDotStroked threeDEmboss
  threeDEngrave outset inset
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**attributes) ⇒ ParagraphBorderSide

Returns a new instance of ParagraphBorderSide.



31
32
33
34
# File 'lib/uniword/paragraph_border.rb', line 31

def initialize(**attributes)
  super
  validate_style
end

Instance Attribute Details

#colorString

Border color (hex)

Returns:

  • (String)

    the current value of color



12
13
14
# File 'lib/uniword/paragraph_border.rb', line 12

def color
  @color
end

#sizeInteger

Border width in eighths of a point

Returns:

  • (Integer)

    the current value of size



12
13
14
# File 'lib/uniword/paragraph_border.rb', line 12

def size
  @size
end

#spaceInteger

Space from text in points

Returns:

  • (Integer)

    the current value of space



12
13
14
# File 'lib/uniword/paragraph_border.rb', line 12

def space
  @space
end

#styleString

Border style (single, thick, double, etc.)

Returns:

  • (String)

    the current value of style



12
13
14
# File 'lib/uniword/paragraph_border.rb', line 12

def style
  @style
end