Class: Rubygpt::Response::BaseResponse
- Inherits:
-
Object
- Object
- Rubygpt::Response::BaseResponse
- Defined in:
- lib/rubygpt/response.rb
Overview
Base class for all API response objects
Direct Known Subclasses
Instance Attribute Summary collapse
-
#api_response ⇒ Object
readonly
The response from the API, standardized by the connection object.
Instance Method Summary collapse
-
#initialize(api_response) ⇒ BaseResponse
constructor
A new instance of BaseResponse.
Constructor Details
#initialize(api_response) ⇒ BaseResponse
Returns a new instance of BaseResponse.
37 38 39 40 41 42 |
# File 'lib/rubygpt/response.rb', line 37 def initialize(api_response) raise ConnectionReturnNotStandardizedError unless api_response.is_a?(StandardApiResponse) @api_response = api_response build_attributes_from_body end |
Instance Attribute Details
#api_response ⇒ Object (readonly)
The response from the API, standardized by the connection object
34 35 36 |
# File 'lib/rubygpt/response.rb', line 34 def api_response @api_response end |