Class: Axlsx::BorderPr
- Inherits:
-
Object
- Object
- Axlsx::BorderPr
- Includes:
- OptionsParser
- Defined in:
- lib/axlsx/stylesheet/border_pr.rb
Overview
A border part.
Instance Attribute Summary collapse
-
#color ⇒ Color
The color of this border part.
-
#name ⇒ Symbol
The name of this border part.
-
#style ⇒ Symbol
The syle of this border part.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BorderPr
constructor
Creates a new Border Part Object.
-
#to_xml_string(str = +'')) ⇒ String
Serializes the object.
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ BorderPr
Creates a new Border Part Object
48 49 50 51 52 53 |
# File 'lib/axlsx/stylesheet/border_pr.rb', line 48 def initialize( = {}) () # options.each do |o| # self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" # end end |
Instance Attribute Details
#color ⇒ Color
Returns The color of this border part.
8 9 10 |
# File 'lib/axlsx/stylesheet/border_pr.rb', line 8 def color @color end |
#name ⇒ Symbol
Note:
The following are allowed :start :end :left :right :top :bottom :diagonal :vertical :horizontal
Returns The name of this border part.
41 42 43 |
# File 'lib/axlsx/stylesheet/border_pr.rb', line 41 def name @name end |
#style ⇒ Symbol
Note:
The following are allowed :none :thin :medium :dashed :dotted :thick :double :hair :mediumDashed :dashDot :mediumDashDot :dashDotDot :mediumDashDotDot :slantDashDot
Returns The syle of this border part.
27 28 29 |
# File 'lib/axlsx/stylesheet/border_pr.rb', line 27 def style @style end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serializes the object
76 77 78 79 80 |
# File 'lib/axlsx/stylesheet/border_pr.rb', line 76 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 |