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)
-
- (Object) method
Returns the value of attribute method.
-
- (Object) request_uri
Returns the value of attribute request_uri.
-
- (Object) response_body
Returns the value of attribute response_body.
-
- (Object) response_object
Returns the value of attribute response_object.
-
- (Object) status
Returns the value of attribute status.
Instance Method Summary (collapse)
-
- (TwitterError) initialize(method, request_uri, status, response_body, msg = nil)
constructor
A new instance of TwitterError.
Constructor Details
- (TwitterError) initialize(method, request_uri, status, response_body, msg = nil)
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
- (Object) method
Returns the value of attribute method
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def method @method end |
- (Object) request_uri
Returns the value of attribute request_uri
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def request_uri @request_uri end |
- (Object) response_body
Returns the value of attribute response_body
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def response_body @response_body end |
- (Object) response_object
Returns the value of attribute response_object
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def response_object @response_object end |
- (Object) status
Returns the value of attribute status
10 11 12 |
# File 'lib/grackle/client.rb', line 10 def status @status end |