diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-03 18:45:30 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-03 18:45:30 +0200 |
| commit | 6a61caa26ef8e8fbe3a88ecd9341976e5a177db5 (patch) | |
| tree | 076ea47e1644fe37909d2438d9dc3c97ca50ef5c /lib/axlsx/workbook/worksheet/worksheet.rb | |
| parent | aaf88bd98054b1823ba0ade4b883b84e41b5e947 (diff) | |
| download | caxlsx-6a61caa26ef8e8fbe3a88ecd9341976e5a177db5.tar.gz caxlsx-6a61caa26ef8e8fbe3a88ecd9341976e5a177db5.zip | |
Fix safe, minor offenses to production code
- Lint/RedundantStringCoercion
- Style/CommentAnnotation offenses
- Style/DefWithParentheses
- Style/EvalWithLocation
- Style/MethodCallWithoutArgsParentheses
- Style/MethodDefParentheses
- Style/NilComparison
- Style/Semicolon
Diffstat (limited to 'lib/axlsx/workbook/worksheet/worksheet.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index b4cad5be..1fb55ff2 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -544,9 +544,9 @@ module Axlsx # @param [Integer|Float|nil] widths def column_widths(*widths) widths.each_with_index do |value, index| - next if value == nil + next if value.nil? - Axlsx::validate_unsigned_numeric(value) unless value == nil + Axlsx::validate_unsigned_numeric(value) unless value.nil? find_or_create_column_info(index).width = value end end @@ -637,7 +637,7 @@ module Axlsx # Serializes the worksheet object to an xml string # This intentionally does not use nokogiri for performance reasons # @return [String] - def to_xml_string str = '' + def to_xml_string(str = '') add_autofilter_defined_name_to_workbook auto_filter.apply if auto_filter.range str << '<?xml version="1.0" encoding="UTF-8"?>' |
