Class: SharkOnLambda::Dispatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/shark_on_lambda/dispatcher.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/shark_on_lambda/dispatcher.rb', line 5

def call(env)
  request = Request.new(env)
  response = Response.new

  controller = controller_class(env)
  action = controller_action(env)
  controller.dispatch(action, request, response)

  response.prepare!
end