module EmailTypo

Constants

AddMissingM
AddMissingPeriod
Aol
DifferentTlds
DotCom
DotNet
DotOrg

require the o, to not false-positive .gr e-mails

FixExtraneousLetterDotCom
FixExtraneousNumbers
Gmail
Googlemail
Hotmail
Icloud
KnownDotCom
PeriodAroundAtSign
Providers
RemoveInvalidChars
RemoveMailTo
TransposedPeriods

can't do “o.gr” => “.org”, as “.gr” is a valid TLD

VERSION
Yahoo

Attributes

default_processors[RW]

List of default processors that will be applied to fix any email's typos.

Public Class Methods

call(email, processors = default_processors) click to toggle source
# File lib/email_typo.rb, line 55
def self.call(email, processors = default_processors)
  return unless email

  processors.reduce(email.downcase) do |processed_email, processor|
    processor.call(processed_email)
  end
end
fix(email, processors = default_processors) click to toggle source
# File lib/email_typo.rb, line 63
def self.fix(email, processors = default_processors)
  warn "EmailTypo.fix is deprecated; use EmailTypo.call instead."
  call(email, processors)
end