Class: Chatpdf::ResponseHandler
- Inherits:
-
Object
- Object
- Chatpdf::ResponseHandler
- Defined in:
- lib/chatpdf/response_handler.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseHandler
constructor
A new instance of ResponseHandler.
- #response_body ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ ResponseHandler
Returns a new instance of ResponseHandler.
3 4 5 |
# File 'lib/chatpdf/response_handler.rb', line 3 def initialize(response) @response = response end |
Instance Method Details
#response_body ⇒ Object
11 12 13 |
# File 'lib/chatpdf/response_handler.rb', line 11 def response_body @response.parsed_response end |
#success? ⇒ Boolean
7 8 9 |
# File 'lib/chatpdf/response_handler.rb', line 7 def success? @response.ok? end |