Class: LambdaOpenApi::Response
- Inherits:
-
Object
- Object
- LambdaOpenApi::Response
- Defined in:
- lib/lambda_open_api/response.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Response
constructor
A new instance of Response.
- #json ⇒ Object
Constructor Details
#initialize(data) ⇒ Response
Returns a new instance of Response.
5 6 7 |
# File 'lib/lambda_open_api/response.rb', line 5 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/lambda_open_api/response.rb', line 3 def data @data end |
Instance Method Details
#json ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/lambda_open_api/response.rb', line 9 def json { "examples": { "application/json": @data } } end |