summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/axis.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/drawing/axis.rb
parentfef93ec8ae2caf8a3f8310dbf8101c103e5905e4 (diff)
downloadcaxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.tar.gz
caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.zip
Fix tests / code to work with frozen string literals
Diffstat (limited to 'lib/axlsx/drawing/axis.rb')
-rw-r--r--lib/axlsx/drawing/axis.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/axlsx/drawing/axis.rb b/lib/axlsx/drawing/axis.rb
index 6ee2b9f4..38e57da5 100644
--- a/lib/axlsx/drawing/axis.rb
+++ b/lib/axlsx/drawing/axis.rb
@@ -148,11 +148,11 @@ module Axlsx
# Serializes the object
# @param [String] str
# @return [String]
- def to_xml_string(str = '')
- str << ('<c:axId val="' << @id.to_s << '"/>')
+ def to_xml_string(str = +'')
+ str << (+'<c:axId val="' << @id.to_s << '"/>')
@scaling.to_xml_string str
- str << ('<c:delete val="' << @delete.to_s << '"/>')
- str << ('<c:axPos val="' << @ax_pos.to_s << '"/>')
+ str << (+'<c:delete val="' << @delete.to_s << '"/>')
+ str << (+'<c:axPos val="' << @ax_pos.to_s << '"/>')
str << '<c:majorGridlines>'
# TODO: shape properties need to be extracted into a class
if gridlines == false
@@ -167,21 +167,21 @@ module Axlsx
# Need to set sourceLinked to 0 if we're setting a format code on this row
# otherwise it will never take, as it will always prefer the 'General' formatting
# of the cells themselves
- str << ('<c:numFmt formatCode="' << @format_code << '" sourceLinked="' << (@format_code.eql?('General') ? '1' : '0') << '"/>')
+ str << (+'<c:numFmt formatCode="' << @format_code << '" sourceLinked="' << (@format_code.eql?('General') ? '1' : '0') << '"/>')
str << '<c:majorTickMark val="none"/>'
str << '<c:minorTickMark val="none"/>'
- str << ('<c:tickLblPos val="' << @tick_lbl_pos.to_s << '"/>')
+ str << (+'<c:tickLblPos val="' << @tick_lbl_pos.to_s << '"/>')
# TODO: this is also being used for series colors
# time to extract this into a class spPr - Shape Properties
if @color
str << '<c:spPr><a:ln><a:solidFill>'
- str << ('<a:srgbClr val="' << @color << '"/>')
+ str << (+'<a:srgbClr val="' << @color << '"/>')
str << '</a:solidFill></a:ln></c:spPr>'
end
# some potential value in implementing this in full. Very detailed!
- str << ('<c:txPr><a:bodyPr rot="' << @label_rotation.to_s << '"/><a:lstStyle/><a:p><a:pPr><a:defRPr/></a:pPr><a:endParaRPr/></a:p></c:txPr>')
- str << ('<c:crossAx val="' << @cross_axis.id.to_s << '"/>')
- str << ('<c:crosses val="' << @crosses.to_s << '"/>')
+ str << (+'<c:txPr><a:bodyPr rot="' << @label_rotation.to_s << '"/><a:lstStyle/><a:p><a:pPr><a:defRPr/></a:pPr><a:endParaRPr/></a:p></c:txPr>')
+ str << (+'<c:crossAx val="' << @cross_axis.id.to_s << '"/>')
+ str << (+'<c:crosses val="' << @crosses.to_s << '"/>')
end
end
end