Exception: Awsum::Error
Defined Under Namespace
Classes: ErrorParser
Instance Attribute Summary collapse
-
#additional ⇒ Object
readonly
Returns the value of attribute additional.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 |
# File 'lib/awsum/error.rb', line 5 def initialize(response) @response_code = response.code parser = ErrorParser.new parser.parse(response.body) @code = parser.code @message = parser. @request_id = parser.request_id @additional = parser.additional end |
Instance Attribute Details
#additional ⇒ Object (readonly)
Returns the value of attribute additional.
3 4 5 |
# File 'lib/awsum/error.rb', line 3 def additional @additional end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/awsum/error.rb', line 3 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/awsum/error.rb', line 3 def @message end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
3 4 5 |
# File 'lib/awsum/error.rb', line 3 def request_id @request_id end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
3 4 5 |
# File 'lib/awsum/error.rb', line 3 def response_code @response_code end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/awsum/error.rb', line 15 def inspect "#<Awsum::Error response_code=#{@response_code} code=#{@code} request_id=#{@request_id} message=#{@message}>" end |