Sha256: b43ac184f522b47dd10a73469ae1d707fa5cf1407d2bf20d4a9c6e032881b8d5
Contents?: true
Size: 421 Bytes
Versions: 16
Compression:
Stored size: 421 Bytes
Contents
# frozen_string_literal: true require "uri" module Git module Lint module Validators # Validates the format of email addresses. class Email def initialize text, pattern: URI::MailTo::EMAIL_REGEXP @text = text @pattern = pattern end def valid? = String(text).match?(pattern) private attr_reader :text, :pattern end end end end
Version data entries
16 entries across 16 versions & 1 rubygems