Exception: MultiInfo::API::Error
- Inherits:
-
StandardError
- Object
- StandardError
- MultiInfo::API::Error
- Defined in:
- lib/multiinfo/api/error.rb
Overview
MultiInfo API Error exception.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
-
.parse(error_arr) ⇒ Object
Creates a new Error from a MultiInfo HTTP response string.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code, message) ⇒ Error
Returns a new instance of Error.
8 9 10 |
# File 'lib/multiinfo/api/error.rb', line 8 def initialize(code, ) @code, @message = code, end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/multiinfo/api/error.rb', line 6 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/multiinfo/api/error.rb', line 6 def @message end |
Class Method Details
.parse(error_arr) ⇒ Object
Creates a new Error from a MultiInfo HTTP response string
13 14 15 16 |
# File 'lib/multiinfo/api/error.rb', line 13 def self.parse(error_arr) code, = error_arr self.new(code, ) end |