summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
diff options
context:
space:
mode:
authorPaul Kmiec <[email protected]>2023-05-04 16:31:08 -0700
committerPaul Kmiec <[email protected]>2023-05-04 18:02:55 -0700
commitfabe8cb2571c8865270247ca78ddc01d493a9ee1 (patch)
tree27fe0b0df8c9bec8f746d92a0d128cad197027b2 /lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
parentfef93ec8ae2caf8a3f8310dbf8101c103e5905e4 (diff)
downloadcaxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.tar.gz
caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.zip
Fix tests / code to work with frozen string literals
Diffstat (limited to 'lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb b/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
index 136e756e..d42c1fda 100644
--- a/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
+++ b/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
@@ -45,15 +45,15 @@ module Axlsx
# Serializes the object
# @param [String] str
# @return [String]
- def to_xml_string(str = '')
+ def to_xml_string(str = +'')
str << '<?xml version="1.0" encoding="UTF-8"?>'
- str << ('<pivotCacheDefinition xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '" invalid="1" refreshOnLoad="1" recordCount="0">')
+ str << (+'<pivotCacheDefinition xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '" invalid="1" refreshOnLoad="1" recordCount="0">')
str << '<cacheSource type="worksheet">'
- str << ('<worksheetSource ref="' << pivot_table.range << '" sheet="' << pivot_table.data_sheet.name << '"/>')
+ str << (+'<worksheetSource ref="' << pivot_table.range << '" sheet="' << pivot_table.data_sheet.name << '"/>')
str << '</cacheSource>'
- str << ('<cacheFields count="' << pivot_table.header_cells_count.to_s << '">')
+ str << (+'<cacheFields count="' << pivot_table.header_cells_count.to_s << '">')
pivot_table.header_cells.each do |cell|
- str << ('<cacheField name="' << cell.clean_value << '" numFmtId="0">')
+ str << (+'<cacheField name="' << cell.clean_value << '" numFmtId="0">')
str << '<sharedItems count="0">'
str << '</sharedItems>'
str << '</cacheField>'