Class: ThreeScale::Core::APIClient::APIError
- Defined in:
- lib/3scale/core/api_client/resource.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(method, uri, response, attributes) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(method, uri, response, attributes) ⇒ APIError
Returns a new instance of APIError.
9 10 11 12 13 |
# File 'lib/3scale/core/api_client/resource.rb', line 9 def initialize(method, uri, response, attributes) @method, @uri, @response, @attributes = method, uri, response, attributes super "#{self.class}: #{response.status} #{method.upcase} #{uri}, attributes:" \ " #{attributes.inspect}, response.body: #{response.body[0,256]}" end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/3scale/core/api_client/resource.rb', line 7 def attributes @attributes end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
7 8 9 |
# File 'lib/3scale/core/api_client/resource.rb', line 7 def method @method end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/3scale/core/api_client/resource.rb', line 7 def response @response end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
7 8 9 |
# File 'lib/3scale/core/api_client/resource.rb', line 7 def uri @uri end |