summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/stylesheet/border.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-04-03 08:38:37 +0900
committerRandy Morgan <[email protected]>2012-04-03 08:38:37 +0900
commit7df172a8f3815e1291f41098705650afd5a2b41d (patch)
tree35f25742e09201a50c595ac0250c000a3c272c65 /lib/axlsx/stylesheet/border.rb
parent6f998ecb098c2a3a5eabc6f8ef44a0f25632f2c8 (diff)
downloadcaxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.tar.gz
caxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.zip
pre-release cleanup
Diffstat (limited to 'lib/axlsx/stylesheet/border.rb')
-rw-r--r--lib/axlsx/stylesheet/border.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/axlsx/stylesheet/border.rb b/lib/axlsx/stylesheet/border.rb
index 99bd410a..d23e5476 100644
--- a/lib/axlsx/stylesheet/border.rb
+++ b/lib/axlsx/stylesheet/border.rb
@@ -42,6 +42,9 @@ module Axlsx
# @see outline
def outline=(v) Axlsx::validate_boolean v; @outline = v end
+ # Serializes the object
+ # @param [String] str
+ # @return [String]
def to_xml_string(str = '')
str << '<border '
h = self.instance_values.select{ |k,v| [:diagonalUp, :diagonalDown, :outline].include? k }
@@ -55,16 +58,5 @@ module Axlsx
str << '</border>'
end
- # Serializes the border element
- # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
- def to_xml(xml)
- xml.border(self.instance_values.select{ |k,v| [:diagonalUp, :diagonalDown, :outline].include? k }) {
- [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal].each do |k|
- @prs.select { |pr| pr.name == k }.each do |part|
- part.to_xml(xml)
- end
- end
- }
- end
end
end