Exception: MailCapture::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mailcapture/errors.rb

Overview

Base class for all MailCapture errors. Check code for a machine-readable error type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code:) ⇒ Error

Returns a new instance of Error.



7
8
9
10
# File 'lib/mailcapture/errors.rb', line 7

def initialize(message, code:)
  super(message)
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/mailcapture/errors.rb', line 5

def code
  @code
end