Class: Chatpdf::ResponseHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/chatpdf/response_handler.rb

Instance Method Summary collapse

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_bodyObject



11
12
13
# File 'lib/chatpdf/response_handler.rb', line 11

def response_body
  @response.parsed_response
end

#success?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/chatpdf/response_handler.rb', line 7

def success?
  @response.ok?
end