Exception: Exetel::API::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Exetel::API::Error
- Defined in:
- lib/exetel/api/error.rb
Overview
Exetel API Error exception
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 |
# File 'lib/exetel/api/error.rb', line 8 def initialize(response) @status = Exetel::API::MessageStatus[response[:status]] = response[:exetel_notes] puts "Error: #{@status} => #{@message}" end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/exetel/api/error.rb', line 6 def end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/exetel/api/error.rb', line 6 def status @status end |