summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/stylesheet/fill.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-04-01 11:58:09 +0900
committerRandy Morgan <[email protected]>2012-04-01 11:58:09 +0900
commit1529fce32449a8454208fded20d83c9ceca810e0 (patch)
tree02f722182fea58a51b8c0a5433221b3a677e80e4 /lib/axlsx/stylesheet/fill.rb
parent22a341841f191a5aa00e87b1f166b4f25cc67f0a (diff)
downloadcaxlsx-1529fce32449a8454208fded20d83c9ceca810e0.tar.gz
caxlsx-1529fce32449a8454208fded20d83c9ceca810e0.zip
rebuild all serialization to use string concatenation instead of nokogiri.
Diffstat (limited to 'lib/axlsx/stylesheet/fill.rb')
-rw-r--r--lib/axlsx/stylesheet/fill.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/axlsx/stylesheet/fill.rb b/lib/axlsx/stylesheet/fill.rb
index 4dccaa8a..d6fde1c7 100644
--- a/lib/axlsx/stylesheet/fill.rb
+++ b/lib/axlsx/stylesheet/fill.rb
@@ -12,12 +12,18 @@ module Axlsx
attr_reader :fill_type
# Creates a new Fill object
- # @param [PatternFill, GradientFill] fill_type
+ # @param [PatternFill, GradientFill] fill_type
# @raise [ArgumentError] if the fill_type parameter is not a PatternFill or a GradientFill instance
def initialize(fill_type)
self.fill_type = fill_type
end
+
+ def to_xml_string(str = '')
+ str << '<fill>'
+ @fill_type.to_xml_string(str)
+ str << '</fill>'
+ end
# Serializes the fill
# @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
# @return [String]