Module: RichEmailValidator

Defined in:
lib/rich_email_validator.rb,
lib/rich_email_validator/version.rb,
lib/rich_email_validator/file_validator.rb,
lib/rich_email_validator/list_validator.rb,
lib/rich_email_validator/email_validator.rb

Overview

RichEmailValidator top level module

Defined Under Namespace

Classes: EmailValidator, FileValidator, ListValidator, Version

Class Method Summary collapse

Class Method Details

.export_valid_list(input_file_path, output_file_path, options = {}) ⇒ Object

Validates input from file and writes to file

Parameters:

  • input_file_path (File)
  • output_file_path (File)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • :threads_count (#to_int)

    number of threads that will be fired simultaneously to calculate the result



42
43
44
45
46
# File 'lib/rich_email_validator.rb', line 42

def export_valid_list(input_file_path, output_file_path, options = {})
  FileValidator.export_valid_list(input_file_path,
                                  output_file_path,
                                  options)
end

.filter_file(input_file_path, options = {}) ⇒ Array

Validates input from file

Parameters:

  • input_file_path (File)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • :threads_count (#to_int)

    number of threads that will be fired simultaneously to calculate the result

Returns:

  • (Array)


32
33
34
# File 'lib/rich_email_validator.rb', line 32

def filter_file(input_file_path, options = {})
  FileValidator.filter(input_file_path, options)
end

.filter_list(list, options = {}) ⇒ Array

Validates list of emails

Parameters:

  • list (Enumerator)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • :threads_count (#to_int)

    number of threads that will be fired simultaneously to calculate the result

Returns:

  • (Array)


22
23
24
# File 'lib/rich_email_validator.rb', line 22

def filter_list(list, options = {})
  ListValidator.filter(list, options)
end

.valid_email?(email) ⇒ Boolean

Validates an email

Parameters:

  • email (String)

Returns:

  • (Boolean)


12
13
14
# File 'lib/rich_email_validator.rb', line 12

def valid_email?(email)
  EmailValidator.valid?(email)
end