class Axlsx::BorderPr

A border part.

Attributes

color[R]

@return [Color] The color of this border part.

name[R]

@return [Symbol] The name of this border part @note

The following are allowed
 :start
 :end
 :left
 :right
 :top
 :bottom
 :diagonal
 :vertical
 :horizontal
style[R]

@return [Symbol] The syle of this border part. @note

The following are allowed
 :none
 :thin
 :medium
 :dashed
 :dotted
 :thick
 :double
 :hair
 :mediumDashed
 :dashDot
 :mediumDashDot
 :dashDotDot
 :mediumDashDotDot
 :slantDashDot

Public Class Methods

new(options={}) click to toggle source

Creates a new Border Part Object @option options [Color] color @option options [Symbol] name @option options [Symbol] style @see Axlsx::Border

# File lib/axlsx/stylesheet/border_pr.rb, line 47
def initialize(options={})
  parse_options(options)
  #options.each do |o|
  #  self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
  #end
end

Public Instance Methods

color=(v) click to toggle source

@see color

# File lib/axlsx/stylesheet/border_pr.rb, line 57
def color=(v) DataTypeValidator.validate(:color, Color, v); @color = v end
name=(v) click to toggle source

@see name

# File lib/axlsx/stylesheet/border_pr.rb, line 55
def name=(v) RestrictionValidator.validate "BorderPr.name", [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal], v; @name = v end
style=(v) click to toggle source

@see style

# File lib/axlsx/stylesheet/border_pr.rb, line 59
def style=(v) RestrictionValidator.validate "BorderPr.style", [:none, :thin, :medium, :dashed, :dotted, :thick, :double, :hair, :mediumDashed, :dashDot, :mediumDashDot, :dashDotDot, :mediumDashDotDot, :slantDashDot], v; @style = v end
to_xml_string(str = '') click to toggle source

Serializes the object @param [String] str @return [String]

# File lib/axlsx/stylesheet/border_pr.rb, line 64
def to_xml_string(str = '')
  str << '<' << @name.to_s << ' style="' << @style.to_s << '">'
  @color.to_xml_string(str) if @color.is_a?(Color)
  str << '</' << @name.to_s << '>'
end