Exception: GoogleR::Error
- Inherits:
-
Exception
- Object
- Exception
- GoogleR::Error
- Defined in:
- lib/google_r/exceptions.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, response) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
Constructor Details
#initialize(status, response) ⇒ Error
Returns a new instance of Error.
5 6 7 |
# File 'lib/google_r/exceptions.rb', line 5 def initialize(status, response) @status, @response = status, response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/google_r/exceptions.rb', line 3 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/google_r/exceptions.rb', line 3 def status @status end |
Instance Method Details
#message ⇒ Object
9 10 11 12 13 14 |
# File 'lib/google_r/exceptions.rb', line 9 def [ "Response code: #{@status}", "Response body: #{@response}", ].join("\n") end |