module EmailAssessor
Constants
- VERSION
Public Class Methods
Source
# File lib/email_assessor.rb, line 15 def [](pathname) @domain_list_cache ||= { # {pathname} => {domain list} } return @domain_list_cache[pathname] if @domain_list_cache.key?(pathname) list = if File.directory?(pathname) DirectoryDomainList.new(pathname) elsif File.file?(pathname) FileDomainList.new(pathname) end @domain_list_cache[pathname] = list list end
Source
# File lib/email_assessor.rb, line 41 def blacklisted_domains @blacklisted_domains ||= default_domain_list("blacklisted_domains") end
Source
# File lib/email_assessor.rb, line 45 def blacklisted_domains=(pathname) @blacklisted_domains = self[pathname] end
Source
# File lib/email_assessor.rb, line 33 def disposable_domains @disposable_domains ||= default_domain_list("disposable_domains") end
Source
# File lib/email_assessor.rb, line 37 def disposable_domains=(pathname) @disposable_domains = self[pathname] end
Source
# File lib/email_assessor.rb, line 49 def educational_domains @educational_domains ||= default_domain_list("educational_domains") end
Source
# File lib/email_assessor.rb, line 53 def educational_domains=(pathname) @educational_domains = self[pathname] end
Source
# File lib/email_assessor.rb, line 57 def fastpass_domains @fastpass_domains ||= default_domain_list("fastpass_domains") end
Source
# File lib/email_assessor.rb, line 61 def fastpass_domains=(pathname) @fastpass_domains = self[pathname] end
Source
# File lib/email_assessor.rb, line 11 def tokenize_domain(domain) EmailAssessor::DomainTokenSet.parse(domain) end
Private Class Methods
Source
# File lib/email_assessor.rb, line 67 def default_domain_list(category) self[File.expand_path("../../vendor/#{category}.txt", __FILE__)] || self[File.expand_path("../../vendor/#{category}", __FILE__)] || self[File.expand_path("../../assets/data/#{category}.txt", __FILE__)] || self[File.expand_path("../../assets/data/#{category}", __FILE__)] || EmptyDomainList.instance end