diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-05-05 11:45:59 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-05 11:45:59 +0200 |
| commit | 916ba45a77302bcd6e81f2a61a6cff6a2f1f8367 (patch) | |
| tree | cf28aa1a8ca2c39e03ddca16086ec85b77410269 /lib/axlsx/drawing/str_data.rb | |
| parent | 3d10ac1e1b067de94e4344b25cbfeecd7bf4bdde (diff) | |
| parent | 816ca05a3903fa4595c4e8382c6201e2615e72f4 (diff) | |
| download | caxlsx-916ba45a77302bcd6e81f2a61a6cff6a2f1f8367.tar.gz caxlsx-916ba45a77302bcd6e81f2a61a6cff6a2f1f8367.zip | |
Merge pull request #219 from pkmiec/frozenStrings
Frozen strings
Diffstat (limited to 'lib/axlsx/drawing/str_data.rb')
| -rw-r--r-- | lib/axlsx/drawing/str_data.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/axlsx/drawing/str_data.rb b/lib/axlsx/drawing/str_data.rb index 5ea8a892..0765671f 100644 --- a/lib/axlsx/drawing/str_data.rb +++ b/lib/axlsx/drawing/str_data.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Axlsx # This specifies the last string data used for a chart. (e.g. strLit and strCache) # This class is extended for NumData to include the formatCode attribute required for numLit and numCache @@ -25,13 +27,13 @@ module Axlsx end # serialize the object - def to_xml_string(str = "") - str << ('<c:' << @tag_name.to_s << '>') - str << ('<c:ptCount val="' << @pt.size.to_s << '"/>') + def to_xml_string(str = +'') + str << (+'<c:' << @tag_name.to_s << '>') + str << (+'<c:ptCount val="' << @pt.size.to_s << '"/>') @pt.each_with_index do |value, index| value.to_xml_string index, str end - str << ('</c:' << @tag_name.to_s << '>') + str << (+'</c:' << @tag_name.to_s << '>') end end end |
