Class: SpecForge::Documentation::Document::Response
- Inherits:
-
Object
- Object
- SpecForge::Documentation::Document::Response
- Defined in:
- lib/spec_forge/documentation/document/response.rb
Overview
Represents a possible response from an API operation
Contains the status code, headers, and body content with content type information.
Instance Method Summary collapse
-
#initialize(content_type:, status:, headers:, body:) ⇒ Response
constructor
Creates a new response with a normalized body.
Constructor Details
#initialize(content_type:, status:, headers:, body:) ⇒ Response
Creates a new response with a normalized body
31 32 33 34 35 |
# File 'lib/spec_forge/documentation/document/response.rb', line 31 def initialize(content_type:, status:, headers:, body:) body = ResponseBody.new(**body) if body.present? super end |