Sha256: fc3e276c106950b77d635523d92872117c2afa77b8402fa89d2f18f361d97844
Contents?: true
Size: 850 Bytes
Versions: 1
Compression:
Stored size: 850 Bytes
Contents
# frozen_string_literal: true require "valid_email2/email_validator" module ValidEmail2 BLACKLIST_FILE = "config/blacklisted_email_domains" WHITELIST_FILE = "config/whitelisted_email_domains.yml" DISPOSABLE_FILE = File.expand_path('../config/disposable_email_domains.txt', __dir__) def self.disposable_emails @disposable_emails ||= File.open(DISPOSABLE_FILE){ |f| f.read }.split("\n") end def self.blacklist @whitelist ||= if File.exist?(BLACKLIST_FILE) YAML.load_file(File.expand_path(BLACKLIST_FILE)) else [] end end def self.whitelist @whitelist ||= if File.exist?(WHITELIST_FILE) YAML.load_file(File.expand_path(WHITELIST_FILE)) else [] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
valid_email2-3.2.0 | lib/valid_email2.rb |