module Email

Constants

ACADEMIC_DOMAINS
ACADEMIC_TLDS
VERSION

Public Class Methods

academic?(email) click to toggle source
# File lib/email.rb, line 10
def academic?(email)
  domain = PublicSuffix.parse(email.split("@")[1])

  if ACADEMIC_TLDS.include?(domain.tld)
    true
  elsif ACADEMIC_DOMAINS.include? (domain.domain)
    true
  else
    false
  end
end