summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/stylesheet/pattern_fill.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/pattern_fill.rb
parent6f998ecb098c2a3a5eabc6f8ef44a0f25632f2c8 (diff)
downloadcaxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.tar.gz
caxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.zip
pre-release cleanup
Diffstat (limited to 'lib/axlsx/stylesheet/pattern_fill.rb')
-rw-r--r--lib/axlsx/stylesheet/pattern_fill.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/axlsx/stylesheet/pattern_fill.rb b/lib/axlsx/stylesheet/pattern_fill.rb
index 32d54d83..0c0a51a6 100644
--- a/lib/axlsx/stylesheet/pattern_fill.rb
+++ b/lib/axlsx/stylesheet/pattern_fill.rb
@@ -55,6 +55,9 @@ module Axlsx
# @see patternType
def patternType=(v) Axlsx::validate_pattern_type v; @patternType = v end
+ # Serializes the object
+ # @param [String] str
+ # @return [String]
def to_xml_string(str = '')
str << '<patternFill patternType="' << patternType.to_s << '">'
if fgColor.is_a?(Color)
@@ -75,13 +78,5 @@ module Axlsx
str << '</patternFill>'
end
- # Serializes the pattern fill
- # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
- # @return [String]
- def to_xml(xml)
- xml.patternFill(:patternType => self.patternType) {
- self.instance_values.reject { |k,v| k.to_sym == :patternType }.each { |k,v| xml.send(k, v.instance_values) }
- }
- end
end
end