diff options
| author | Randy Morgan <[email protected]> | 2012-05-15 12:10:39 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-15 12:10:39 +0900 |
| commit | dfc4f57d3153c4d7c8800cfd9f59df9b31dcdf93 (patch) | |
| tree | cfc05c0ed6e8e8d59f0116b5a0faf14793ae573b /lib/axlsx/stylesheet/table_style.rb | |
| parent | 2d744ba77906d460b608859c945a5741ec725e42 (diff) | |
| download | caxlsx-dfc4f57d3153c4d7c8800cfd9f59df9b31dcdf93.tar.gz caxlsx-dfc4f57d3153c4d7c8800cfd9f59df9b31dcdf93.zip | |
patch for 1.8.7
Diffstat (limited to 'lib/axlsx/stylesheet/table_style.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/table_style.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/stylesheet/table_style.rb b/lib/axlsx/stylesheet/table_style.rb index 324f33d6..db837b99 100644 --- a/lib/axlsx/stylesheet/table_style.rb +++ b/lib/axlsx/stylesheet/table_style.rb @@ -40,10 +40,10 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = '') - attr = self.instance_values.select { |k, v| [:name, :pivot, :table].include? k } - attr[:count] = self.size + attrs = instance_values.reject { |k, v| ![:name, :pivot, :table].include?(k) } + attrs[:count] = self.size str << '<tableStyle ' - str << attr.map { |key, value| '' << key.to_s << '="' << value.to_s << '"' }.join(' ') + str << attrs.map { |key, value| '' << key.to_s << '="' << value.to_s << '"' }.join(' ') str << '>' each { |table_style_el| table_style_el.to_xml_string(str) } str << '</tableStyle>' |
