diff --git a/.rubocop.yml b/.rubocop.yml index 9ee1c59..606a04c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,6 +7,9 @@ TrailingComma: AccessModifierIndentation: EnforcedStyle: outdent +SingleLineBlockParams: + Enabled: false + MethodLength: Max: 15 diff --git a/lib/email_repair/mechanic.rb b/lib/email_repair/mechanic.rb index f4aecd1..62d80c1 100644 --- a/lib/email_repair/mechanic.rb +++ b/lib/email_repair/mechanic.rb @@ -34,9 +34,7 @@ def repair_all(emails) def repair(email) return unless email - repairs.each { |repair| email = repair.repair(email) } - - email + repairs.reduce(email) { |memo, repair| repair.repair(memo) } end class CommonMistakeRepair