Class: IsEmail::Validators::Base Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

An abstract base class for validators

Direct Known Subclasses

Parser

Instance Method Summary collapse

Instance Method Details

#email?(address, diagnose: false) ⇒ Boolean, Diagnosis

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Checks whether an address is valid, optionally returning a diagnosis

:nocov:

Parameters:

  • address (String)

    the address to check

  • diagnose (Boolean) (defaults to: false)

    whether to return a diagnosis or not

Returns:

  • (Boolean, Diagnosis)

    when not diagnosing, true when the address is valid and false otherwise; when diagnosing, the diagnosis for the status of the address

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/is_email/validators/base.rb', line 17

def email?(address, diagnose: false)
  raise NotImplementedError
end