diff options
| author | Geremia Taglialatela <[email protected]> | 2023-06-05 17:14:59 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-06-05 17:27:41 +0200 |
| commit | b0fb7d1f19afbc933b3aa445f5d95d4b6bef9f6b (patch) | |
| tree | a50309ea3b0db8a2de8d3f6985ba29de3b826f5a /lib/axlsx/workbook/workbook.rb | |
| parent | 0cc60e3eb08e11542612871e2e15350ed07fff06 (diff) | |
| download | caxlsx-b0fb7d1f19afbc933b3aa445f5d95d4b6bef9f6b.tar.gz caxlsx-b0fb7d1f19afbc933b3aa445f5d95d4b6bef9f6b.zip | |
Prefer `Kernel#format` to `String#%`
This commit fixes cases that cannot be detected by RuboCop
Ref: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FormatString
Diffstat (limited to 'lib/axlsx/workbook/workbook.rb')
| -rw-r--r-- | lib/axlsx/workbook/workbook.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index 271d4300..0f4db9ce 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -354,10 +354,10 @@ module Axlsx def relationships r = Relationships.new @worksheets.each do |sheet| - r << Relationship.new(sheet, WORKSHEET_R, WORKSHEET_PN % (r.size + 1)) + r << Relationship.new(sheet, WORKSHEET_R, format(WORKSHEET_PN, r.size + 1)) end pivot_tables.each_with_index do |pivot_table, index| - r << Relationship.new(pivot_table.cache_definition, PIVOT_TABLE_CACHE_DEFINITION_R, PIVOT_TABLE_CACHE_DEFINITION_PN % (index + 1)) + r << Relationship.new(pivot_table.cache_definition, PIVOT_TABLE_CACHE_DEFINITION_R, format(PIVOT_TABLE_CACHE_DEFINITION_PN, index + 1)) end r << Relationship.new(self, STYLES_R, STYLES_PN) if use_shared_strings |
