summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/stylesheet/border_pr.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/axlsx/stylesheet/border_pr.rb')
-rw-r--r--lib/axlsx/stylesheet/border_pr.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/axlsx/stylesheet/border_pr.rb b/lib/axlsx/stylesheet/border_pr.rb
index b15e3918..eb1ecf4b 100644
--- a/lib/axlsx/stylesheet/border_pr.rb
+++ b/lib/axlsx/stylesheet/border_pr.rb
@@ -57,19 +57,14 @@ module Axlsx
# @see style
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
+ # Serializes the object
+ # @param [String] str
+ # @return [String]
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
- # Serializes the border part
- # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
- # @return [String]
- def to_xml(xml)
- xml.send(@name, :style => @style) {
- @color.to_xml(xml) if @color.is_a? Color
- }
- end
end
end