Exception: Postal::MessageNotFound

Inherits:
Error
  • Object
show all
Defined in:
lib/postal/error.rb

Overview

Raised when a message cannot be found by its ID

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ MessageNotFound

Returns a new instance of MessageNotFound.



13
14
15
# File 'lib/postal/error.rb', line 13

def initialize(id)
  @id = id
end

Instance Method Details

#messageObject



17
18
19
# File 'lib/postal/error.rb', line 17

def message
  "No message found matching ID '#{@id}'"
end

#to_sObject



21
22
23
# File 'lib/postal/error.rb', line 21

def to_s
  message
end