diff options
| author | Randy Morgan <[email protected]> | 2012-04-03 08:38:37 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-04-03 08:38:37 +0900 |
| commit | 7df172a8f3815e1291f41098705650afd5a2b41d (patch) | |
| tree | 35f25742e09201a50c595ac0250c000a3c272c65 /lib/axlsx/stylesheet/table_styles.rb | |
| parent | 6f998ecb098c2a3a5eabc6f8ef44a0f25632f2c8 (diff) | |
| download | caxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.tar.gz caxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.zip | |
pre-release cleanup
Diffstat (limited to 'lib/axlsx/stylesheet/table_styles.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/table_styles.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/axlsx/stylesheet/table_styles.rb b/lib/axlsx/stylesheet/table_styles.rb index 5474c165..a43e7ce5 100644 --- a/lib/axlsx/stylesheet/table_styles.rb +++ b/lib/axlsx/stylesheet/table_styles.rb @@ -25,7 +25,9 @@ module Axlsx # @see defaultPivotStyle def defaultPivotStyle=(v) Axlsx::validate_string(v); @defaultPivotStyle = v; end - + # Serializes the object + # @param [String] str + # @return [String] def to_xml_string(str = '') attr = self.instance_values.reject {|k, v| ![:defaultTableStyle, :defaultPivotStyle].include?(k.to_sym) } attr[:count] = self.size @@ -36,16 +38,6 @@ module Axlsx str << '</tableStyles>' end - # Serializes the table styles element - # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to. - # @return [String] - def to_xml(xml) - attr = self.instance_values.reject {|k, v| ![:defaultTableStyle, :defaultPivotStyle].include?(k.to_sym) } - attr[:count] = self.size - xml.tableStyles(attr) { - self.each { |table_style| table_style.to_xml(xml) } - } - end end end |
