Class: OasCore::Spec::Response
- Inherits:
-
Object
- Object
- OasCore::Spec::Response
- Defined in:
- lib/oas_core/spec/response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#content ⇒ Object
Returns the value of attribute content.
-
#description ⇒ Object
Returns the value of attribute description.
Instance Method Summary collapse
-
#initialize(specification) ⇒ Response
constructor
A new instance of Response.
- #oas_fields ⇒ Object
Methods included from Hashable
generate_hash, #hash_key, #hash_representation, hash_representation_recursive, #public_instance_variables
Methods included from Specable
Constructor Details
#initialize(specification) ⇒ Response
Returns a new instance of Response.
11 12 13 14 15 16 |
# File 'lib/oas_core/spec/response.rb', line 11 def initialize(specification) @specification = specification @description = '' @content = {} # Hash with {content: MediaType} @code = 200 end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
9 10 11 |
# File 'lib/oas_core/spec/response.rb', line 9 def code @code end |
#content ⇒ Object
Returns the value of attribute content.
9 10 11 |
# File 'lib/oas_core/spec/response.rb', line 9 def content @content end |
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/oas_core/spec/response.rb', line 9 def description @description end |
Instance Method Details
#oas_fields ⇒ Object
18 19 20 |
# File 'lib/oas_core/spec/response.rb', line 18 def oas_fields %i[description content] end |