summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/col.rb
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-05-22 18:58:38 +0200
committerGeremia Taglialatela <[email protected]>2023-05-22 18:58:38 +0200
commit0f6062ef7cafb53396256c7b5b9cf5e715693637 (patch)
tree41e6fe05ddbd068bd5dd031bd3ac8e08cbc08e71 /lib/axlsx/workbook/worksheet/col.rb
parent6752225bbb8a9eec905ec02a98f1a25a309c404a (diff)
downloadcaxlsx-0f6062ef7cafb53396256c7b5b9cf5e715693637.tar.gz
caxlsx-0f6062ef7cafb53396256c7b5b9cf5e715693637.zip
Fix Style/NonNilCheck offenses
There were 8 occurrences of `!nil?` and 4 of `!= nil`. This change will standardize the usage of non-nil checks
Diffstat (limited to 'lib/axlsx/workbook/worksheet/col.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/col.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/col.rb b/lib/axlsx/workbook/worksheet/col.rb
index 539a6007..ff942d32 100644
--- a/lib/axlsx/workbook/worksheet/col.rb
+++ b/lib/axlsx/workbook/worksheet/col.rb
@@ -114,7 +114,7 @@ module Axlsx
# current @width value.
# TODO!!!
# Axlsx.validate_unsigned_numeric(v) unless v == nil
- @custom_width = @best_fit = v != nil
+ @custom_width = @best_fit = !v.nil?
@width = v.nil? ? v : [v, MAX_WIDTH].min
end