lib/git/lint/validators/email.rb in git-lint-4.6.0 vs lib/git/lint/validators/email.rb in git-lint-5.0.0

- old
+ new

@@ -5,19 +5,18 @@ module Git module Lint module Validators # Validates the format of email addresses. class Email - def initialize text, pattern: URI::MailTo::EMAIL_REGEXP - @text = text + def initialize pattern: URI::MailTo::EMAIL_REGEXP @pattern = pattern end - def valid? = String(text).match?(pattern) + def call(content) = String(content).match? pattern private - attr_reader :text, :pattern + attr_reader :pattern end end end end