From b9f3f313f8ec992917bad3a51f0481f89675e935 Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Sat, 10 Feb 2024 23:21:17 +0000 Subject: [PATCH] style(rubocop): Style/AndOr --- config/initializers/mail_extensions.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/initializers/mail_extensions.rb b/config/initializers/mail_extensions.rb index d489176..a64974d 100644 --- a/config/initializers/mail_extensions.rb +++ b/config/initializers/mail_extensions.rb @@ -22,7 +22,7 @@ module Mail ## Extract plain text body of message def plain_body - if multipart? and text_part + if multipart? && text_part text_part.decoded elsif mime_type == "text/plain" || mime_type.nil? decoded @@ -31,7 +31,7 @@ module Mail ## Extract HTML text body of message def html_body - if multipart? and html_part + if multipart? && html_part html_part.decoded elsif mime_type == "text/html" decoded @@ -116,7 +116,7 @@ module Mail @parts_list = parts_list @content_disposition_type = "attachment" parts_list.map do |p| - (p.parts.empty? and p.attachment?) ? p : p.attachments + p.parts.empty? && p.attachment? ? p : p.attachments end.flatten.compact.each { |a| self << a } self end