lib/email_inquire.rb in email_inquire-0.7.0 vs lib/email_inquire.rb in email_inquire-0.8.0
- old
+ new
@@ -10,6 +10,26 @@
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