Class: Truemail::Validate::DomainListMatch

Inherits:
Base
  • Object
show all
Defined in:
lib/truemail/validate/domain_list_match.rb

Constant Summary collapse

ERROR =
'blacklisted email'

Instance Attribute Summary

Attributes inherited from Worker

#result

Instance Method Summary collapse

Methods inherited from Worker

check, #initialize

Constructor Details

This class inherits a constructor from Truemail::Worker

Instance Method Details

#runObject


8
9
10
11
12
13
# File 'lib/truemail/validate/domain_list_match.rb', line 8

def run
  return success(true) if whitelisted_domain? && !whitelist_validation?
  return unless whitelist_validation_case? || blacklisted_domain?
  success(false)
  add_error(Truemail::Validate::DomainListMatch::ERROR)
end