style(rubocop): Lint/DuplicateMethods

This commit is contained in:
Adam Cooke
2024-02-12 09:55:18 +00:00
parent a1dc0f77ac
commit bab6346239
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -31,6 +31,7 @@ class IncomingMessagePrototype
end end
end end
# rubocop:disable Lint/DuplicateMethods
def attachments def attachments
(@attachments || []).map do |attachment| (@attachments || []).map do |attachment|
{ {
@@ -40,6 +41,7 @@ class IncomingMessagePrototype
} }
end end
end end
# rubocop:enable Lint/DuplicateMethods
def create_messages def create_messages
if valid? if valid?
+2
View File
@@ -93,6 +93,7 @@ class OutgoingMessagePrototype
@errors || {} @errors || {}
end end
# rubocop:disable Lint/DuplicateMethods
def attachments def attachments
(@attachments || []).map do |attachment| (@attachments || []).map do |attachment|
{ {
@@ -102,6 +103,7 @@ class OutgoingMessagePrototype
} }
end end
end end
# rubocop:enable Lint/DuplicateMethods
def validate def validate
@errors = [] @errors = []