Class: Validators::DisposableDomains

Inherits:
Object
  • Object
show all
Defined in:
lib/validators/disposable_domains.rb

Class Method Summary collapse

Class Method Details

.allObject



5
6
7
8
9
10
11
12
13
# File 'lib/validators/disposable_domains.rb', line 5

def self.all
  @all ||=
    begin
      require "email_data"
      EmailData.disposable_domains
    rescue LoadError
      raise "email_data is not part of the bundle. Add it to Gemfile."
    end
end

.include?(domain) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/validators/disposable_domains.rb', line 15

def self.include?(domain)
  all.include?(domain)
end