diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-25 12:12:39 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-25 12:12:39 +0200 |
| commit | 514fc8c2f334f0e859c5512a3766775daed04847 (patch) | |
| tree | e43a7baf4177224942a3e39a7f611585d0e79603 | |
| parent | 63a6edf1e191cf91fb80717ebae67c78af0d7db5 (diff) | |
| download | caxlsx-514fc8c2f334f0e859c5512a3766775daed04847.tar.gz caxlsx-514fc8c2f334f0e859c5512a3766775daed04847.zip | |
Remove duplicate check
Axlsx::Row is now an Array, so it is possible to remove the extra
duplicate branch
| -rw-r--r-- | .rubocop_todo.yml | 11 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/merged_cells.rb | 4 |
2 files changed, 1 insertions, 14 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bb6a38f9..9e24c6ea 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -60,11 +60,6 @@ Lint/DisjunctiveAssignmentInConstructor: Exclude: - 'lib/axlsx/drawing/num_data_source.rb' -# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. -Lint/DuplicateBranch: - Exclude: - - 'lib/axlsx/workbook/worksheet/merged_cells.rb' - Lint/NonLocalExitFromIterator: Exclude: - 'lib/axlsx/util/validators.rb' @@ -97,12 +92,6 @@ Style/AccessorGrouping: Style/Alias: Enabled: false -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: MinBranchesCount. -Style/CaseLikeIf: - Exclude: - - 'lib/axlsx/workbook/worksheet/merged_cells.rb' - Style/ClassVars: Exclude: - 'lib/axlsx.rb' diff --git a/lib/axlsx/workbook/worksheet/merged_cells.rb b/lib/axlsx/workbook/worksheet/merged_cells.rb index c0ca1ebe..c3fb6dde 100644 --- a/lib/axlsx/workbook/worksheet/merged_cells.rb +++ b/lib/axlsx/workbook/worksheet/merged_cells.rb @@ -12,7 +12,7 @@ module Axlsx end # adds cells to the merged cells collection - # @param [Array||String] cells The cells to add to the merged cells + # @param [Array|String] cells The cells to add to the merged cells # collection. This can be an array of actual cells or a string style # range like 'A1:C1' def add(cells) @@ -20,8 +20,6 @@ module Axlsx cells elsif cells.is_a?(Array) Axlsx::cell_range(cells, false) - elsif cells.is_a?(Row) - Axlsx::cell_range(cells, false) end end |
