Exception: Hanami::Mailer::MissingAttachmentError
- Defined in:
- lib/hanami/mailer/errors.rb
Overview
Raised when a static attachment file cannot be found
Instance Method Summary collapse
-
#initialize(filename, paths = []) ⇒ MissingAttachmentError
constructor
A new instance of MissingAttachmentError.
Constructor Details
#initialize(filename, paths = []) ⇒ MissingAttachmentError
Returns a new instance of MissingAttachmentError.
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/hanami/mailer/errors.rb', line 42 def initialize(filename, paths = []) = if paths.any? "Attachment file not found: #{filename}. "\ "Searched in: #{paths.join(', ')}" else "Attachment file not found: #{filename}. " \ "Configure `attachment_paths` to specify where attachment files are located." end super() end |