class EmailRepair::Mechanic::CommonDomainPeriodAdder
Public Class Methods
repair(email)
click to toggle source
# File lib/email_repair/mechanic.rb, line 88 def self.repair(email) common_domains.each do |name, suffix| regex = /#{name}#{suffix}$/ email = email.sub(regex, "#{name}.#{suffix}") if email.match(regex) end email end