Exception: Grackle::TwitterError
- Inherits:
-
StandardError
- Object
- StandardError
- Grackle::TwitterError
- Defined in:
- lib/grackle/client.rb
Overview
Raised by methods which call the API if a non-200 response status is received
Instance Attribute Summary collapse
-
#method ⇒ Object
Returns the value of attribute method.
-
#request_uri ⇒ Object
Returns the value of attribute request_uri.
-
#response_body ⇒ Object
Returns the value of attribute response_body.
-
#response_object ⇒ Object
Returns the value of attribute response_object.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(method, request_uri, status, response_body, msg = nil) ⇒ TwitterError
constructor
A new instance of TwitterError.
Constructor Details
#initialize(method, request_uri, status, response_body, msg = nil) ⇒ TwitterError
Returns a new instance of TwitterError.
12 13 14 15 16 17 18 |
# File 'lib/grackle/client.rb', line 12 def initialize(method, request_uri, status, response_body, msg=nil) self.method = method self.request_uri = request_uri self.status = status self.response_body = response_body super(msg||"#{self.method} #{self.request_uri} => #{self.status}: #{self.response_body}") end |
Instance Attribute Details
#method ⇒ Object
Returns the value of attribute method.
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def method @method end |
#request_uri ⇒ Object
Returns the value of attribute request_uri.
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def request_uri @request_uri end |
#response_body ⇒ Object
Returns the value of attribute response_body.
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def response_body @response_body end |
#response_object ⇒ Object
Returns the value of attribute response_object.
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def response_object @response_object end |
#status ⇒ Object
Returns the value of attribute status.
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def status @status end |