Sha256: cf5eb25e31cb10e214b074ab09bd358162391f4a0ae2a3e16c4f9c8d97d8f661
Contents?: true
Size: 623 Bytes
Versions: 21
Compression:
Stored size: 623 Bytes
Contents
module Spreewald SUPPORTED_EMAIL_HEADERS = ["To", "CC", "BCC", "From", "Reply-To", "Subject", "Attachments"] class UnsupportedEmailHeader < StandardError attr_reader :header, :value def initialize(header, value) @header, @value = header, value error_message = <<-MESSAGE.strip_heredoc It looks like you're trying to match against an unsupported header "#{header}". The following headers are supported: #{supported_headers_list} MESSAGE super(error_message) end private def supported_headers_list SUPPORTED_EMAIL_HEADERS.join(", ") end end end
Version data entries
21 entries across 21 versions & 1 rubygems