Exception: Deliveries::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/deliveries/errors.rb

Overview

For errors returned by the API

Direct Known Subclasses

InvalidDateError, InvalidTimeIntervalError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, code = nil) ⇒ APIError

Returns a new instance of APIError.



12
13
14
15
# File 'lib/deliveries/errors.rb', line 12

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



10
11
12
# File 'lib/deliveries/errors.rb', line 10

def code
  @code
end