Exception: Hungrytable::APIError

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

Overview

API errors

Instance Attribute Summary collapse

Instance Method Summary collapse

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_message)
  @error_code = error_code
  @error_message = error_message
  super("OpenTable API Error #{error_code}: #{error_message}")
end

Instance Attribute Details

#error_codeObject (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_messageObject (readonly)

Returns the value of attribute error_message.



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

def error_message
  @error_message
end