Exception: Hungrytable::APIError
- Defined in:
- lib/hungrytable/errors.rb
Overview
API errors
Direct Known Subclasses
NoAvailabilityError, ReservationError, RestaurantNotFoundError, SlotlockError
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
Instance Method Summary collapse
-
#initialize(error_code, error_message) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(error_code, error_message) ⇒ APIError
Returns a new instance of APIError.
14 15 16 17 18 |
# File 'lib/hungrytable/errors.rb', line 14 def initialize(error_code, ) @error_code = error_code @error_message = super("OpenTable API Error #{error_code}: #{}") end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
12 13 14 |
# File 'lib/hungrytable/errors.rb', line 12 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
12 13 14 |
# File 'lib/hungrytable/errors.rb', line 12 def @error_message end |