Class: Git::Lint::Validators::Email
- Inherits:
-
Object
- Object
- Git::Lint::Validators::Email
- Defined in:
- lib/git/lint/validators/email.rb
Overview
Validates the format of email addresses.
Instance Method Summary collapse
- #call(content) ⇒ Object
-
#initialize(pattern: URI::MailTo::EMAIL_REGEXP) ⇒ Email
constructor
A new instance of Email.
Constructor Details
#initialize(pattern: URI::MailTo::EMAIL_REGEXP) ⇒ Email
Returns a new instance of Email.
10 11 12 |
# File 'lib/git/lint/validators/email.rb', line 10 def initialize pattern: URI::MailTo::EMAIL_REGEXP @pattern = pattern end |
Instance Method Details
#call(content) ⇒ Object
14 |
# File 'lib/git/lint/validators/email.rb', line 14 def call(content) = String(content).match? pattern |