mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
15 lines
197 B
Ruby
15 lines
197 B
Ruby
class EmailValidator
|
|
def self.regexp
|
|
Devise::email_regexp
|
|
end
|
|
|
|
def initialize(email)
|
|
@email = email
|
|
end
|
|
|
|
def valid?
|
|
email =~ self.class.regexp
|
|
end
|
|
|
|
attr_reader :email
|
|
end
|