Class: EmailRepair::Mechanic::CommonDomainSuffixRepair

Inherits:
CommonDomainRepair show all
Defined in:
lib/email_repair/mechanic.rb

Class Method Summary collapse

Methods inherited from CommonDomainRepair

common_domains

Class Method Details

.repair(email) ⇒ Object



79
80
81
82
83
84
# File 'lib/email_repair/mechanic.rb', line 79

def self.repair(email)
  common_domains.each do |name, suffix|
    email = "#{email}.#{suffix}" if email.match?(/#{name}$/)
  end
  email
end