Skip to content

Commit

Permalink
style(rubocop): Lint/DuplicateMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Feb 12, 2024
1 parent a1dc0f7 commit bab6346
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/incoming_message_prototype.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def route
end
end

# rubocop:disable Lint/DuplicateMethods
def attachments
(@attachments || []).map do |attachment|
{
Expand All @@ -40,6 +41,7 @@ def attachments
}
end
end
# rubocop:enable Lint/DuplicateMethods

def create_messages
if valid?
Expand Down
2 changes: 2 additions & 0 deletions app/models/outgoing_message_prototype.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def errors
@errors || {}
end

# rubocop:disable Lint/DuplicateMethods
def attachments
(@attachments || []).map do |attachment|
{
Expand All @@ -102,6 +103,7 @@ def attachments
}
end
end
# rubocop:enable Lint/DuplicateMethods

def validate
@errors = []
Expand Down

0 comments on commit bab6346

Please sign in to comment.