diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-05-22 10:34:18 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-22 10:34:18 +0200 |
| commit | 32e9f95f0d9612db0c906cf675c7df2d637a5aab (patch) | |
| tree | 85deb2e4257356af1186bc6736f873491a607cc5 /lib/axlsx/package.rb | |
| parent | 0f812ee216076a4c713f6cadb0751bac45f6b9da (diff) | |
| parent | 45dae7aad208d850fa522348861cf56ddafa3c97 (diff) | |
| download | caxlsx-32e9f95f0d9612db0c906cf675c7df2d637a5aab.tar.gz caxlsx-32e9f95f0d9612db0c906cf675c7df2d637a5aab.zip | |
Merge pull request #243 from tagliala/chore/fix-zero-length-predicate-offenses
Fix Style/ZeroLengthPredicate unsafe offenses
Diffstat (limited to 'lib/axlsx/package.rb')
| -rw-r--r-- | lib/axlsx/package.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb index e8276d7c..3f225648 100644 --- a/lib/axlsx/package.rb +++ b/lib/axlsx/package.rb @@ -239,7 +239,7 @@ module Axlsx end workbook.comments.each do |comment| - if comment.size > 0 + unless comment.empty? parts << { :entry => "xl/#{comment.pn}", :doc => comment, :schema => SML_XSD } parts << { :entry => "xl/#{comment.vml_drawing.pn}", :doc => comment.vml_drawing, :schema => nil } end @@ -314,13 +314,13 @@ module Axlsx end workbook.comments.each do |comment| - if comment.size > 0 + unless comment.empty? c_types << Axlsx::Override.new(:PartName => "/xl/#{comment.pn}", :ContentType => COMMENT_CT) end end - if workbook.comments.size > 0 + unless workbook.comments.empty? c_types << Axlsx::Default.new(:Extension => "vml", :ContentType => VML_DRAWING_CT) end |
