Method: Context#respond

Defined in:
lib/webfx.rb

#respond(response) ⇒ Object



36
37
38
39
40
41
42
43
44
45
# File 'lib/webfx.rb', line 36

def respond(response)
  @env['async.callback'].call [response[0], response[1], @body]
  @body.call [response[2]]
  
  if response[0] < 400
    @body.succeed
  else
    @body.fail
  end
end