Class: EBuilder::ExtendedRack

Inherits:
Struct
  • Object
show all
Defined in:
lib/e-builder/base.rb

Overview

kindly borrowed from Sinatra

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



329
330
331
332
333
334
335
# File 'lib/e-builder/base.rb', line 329

def call(env)
  result, callback = app.call(env), env['async.callback']
  return result unless callback and async?(*result)
  after_response { callback.call result }
  setup_close(env, *result)
  throw :async
end