Class: OpenAPIParser::RequestOperation::ValidatableResponseBody
- Inherits:
-
Object
- Object
- OpenAPIParser::RequestOperation::ValidatableResponseBody
- Defined in:
- lib/openapi_parser/request_operation.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#response_data ⇒ Object
readonly
Returns the value of attribute response_data.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
- #content_type ⇒ Object
-
#initialize(status_code, response_data, headers) ⇒ ValidatableResponseBody
constructor
A new instance of ValidatableResponseBody.
Constructor Details
#initialize(status_code, response_data, headers) ⇒ ValidatableResponseBody
Returns a new instance of ValidatableResponseBody.
75 76 77 78 79 |
# File 'lib/openapi_parser/request_operation.rb', line 75 def initialize(status_code, response_data, headers) @status_code = status_code @response_data = response_data @headers = headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
73 74 75 |
# File 'lib/openapi_parser/request_operation.rb', line 73 def headers @headers end |
#response_data ⇒ Object (readonly)
Returns the value of attribute response_data.
73 74 75 |
# File 'lib/openapi_parser/request_operation.rb', line 73 def response_data @response_data end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
73 74 75 |
# File 'lib/openapi_parser/request_operation.rb', line 73 def status_code @status_code end |
Instance Method Details
#content_type ⇒ Object
81 82 83 |
# File 'lib/openapi_parser/request_operation.rb', line 81 def content_type headers['Content-Type'].to_s.split(';').first.to_s end |