class Swot
def valid?
Returns true if the domain name belongs to an academic institution;
Figure out if an email or domain belongs to academic institution.
def valid? if domain.nil? false elsif BLACKLIST.any? { |d| to_s =~ /(\A|\.)#{Regexp.escape(d)}\z/ } false elsif ACADEMIC_TLDS.include?(domain.tld) true elsif academic_domain? true else false end end