Class: LambdaOpenApi::Invoker
- Inherits:
-
Object
- Object
- LambdaOpenApi::Invoker
- Defined in:
- lib/lambda_open_api/invoker.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(klass:, method:, event:, context:) ⇒ Invoker
constructor
A new instance of Invoker.
- #response_body ⇒ Object
Constructor Details
#initialize(klass:, method:, event:, context:) ⇒ Invoker
Returns a new instance of Invoker.
6 7 8 |
# File 'lib/lambda_open_api/invoker.rb', line 6 def initialize(klass:, method:, event:, context:) @response = klass.send(method || "process", event: event, context: context) end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
4 5 6 |
# File 'lib/lambda_open_api/invoker.rb', line 4 def response @response end |
Instance Method Details
#response_body ⇒ Object
10 11 12 13 |
# File 'lib/lambda_open_api/invoker.rb', line 10 def response_body return unless response response["body"] || response[:body] || response end |