Sha256: b7c92371fccb9cdc8b226489c6d595242b2baa70d3e28e471e7c1bde02204eb7

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

# frozen_string_literal: true

require "email_inquire/version"
require "email_inquire/email_validator"
require "email_inquire/inquirer"
require "email_inquire/response"

module EmailInquire

  def self.validate(email)
    inquirer = Inquirer.new(email)
    inquirer.validate
  end

  def self.custom_invalid_domains=(domains)
    @@custom_invalid_domains =
      case domains
      when Set
        domains
      when Array
        domains.to_set
      when nil
        Set.new
      else
        raise ArgumentError, "Unsupported type in `custom_invalid_domains=`"
      end
  end

  def self.custom_invalid_domains
    @@custom_invalid_domains ||= Set.new

    @@custom_invalid_domains
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
email_inquire-0.8.0 lib/email_inquire.rb