From ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 10 Jun 2023 11:48:13 +0200 Subject: Fix safe Style/ColonMethodCall offenses Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke methods on `Axlsx` module. This commit standardizes the approach towards `.`, which will also allow shorter lines. Performance is not affected ``` Comparison: Axlsx.validate: 8515252.3 i/s Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error ``` --- lib/axlsx/drawing/title.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/axlsx/drawing/title.rb') diff --git a/lib/axlsx/drawing/title.rb b/lib/axlsx/drawing/title.rb index 84687a32..8fa79e52 100644 --- a/lib/axlsx/drawing/title.rb +++ b/lib/axlsx/drawing/title.rb @@ -69,11 +69,11 @@ module Axlsx def to_xml_string(str = +'') str << '' unless empty? - clean_value = Axlsx::trust_input ? @text.to_s : ::CGI.escapeHTML(Axlsx::sanitize(@text.to_s)) + clean_value = Axlsx.trust_input ? @text.to_s : ::CGI.escapeHTML(Axlsx.sanitize(@text.to_s)) str << '' if @cell.is_a?(Cell) str << '' - str << '' << Axlsx::cell_range([@cell]) << '' + str << '' << Axlsx.cell_range([@cell]) << '' str << '' str << '' str << '' -- cgit v1.2.3