Exception: Mailflow::SendError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, error_message) ⇒ SendError

Returns a new instance of SendError.



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

def initialize(code, error_message)
  @code = code
  @error_message = error_message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



22
23
24
# File 'lib/mailflow/error.rb', line 22

def code
  @code
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



22
23
24
# File 'lib/mailflow/error.rb', line 22

def error_message
  @error_message
end

Instance Method Details

#messageObject Also known as: to_s



24
25
26
# File 'lib/mailflow/error.rb', line 24

def message
  "[#{@code}] #{@error_message}"
end