Module: Apigatewayv2Rack::Handler

Defined in:
lib/apigatewayv2_rack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



26
27
28
# File 'lib/apigatewayv2_rack.rb', line 26

def app
  @app
end

#blockObject (readonly)

Returns the value of attribute block.



27
28
29
# File 'lib/apigatewayv2_rack.rb', line 27

def block
  @block
end

Instance Method Details

#handle(event:, context:, &givenblock) ⇒ Object



28
29
30
31
# File 'lib/apigatewayv2_rack.rb', line 28

def handle(event:, context:, &givenblock)
  b = givenblock || @block
  Apigatewayv2Rack.handle_request(event: event, context: context, app: @app, &b)
end