Class: Rack::Async2Sync::AsyncResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/async2sync.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



35
36
37
# File 'lib/rack/async2sync.rb', line 35

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



35
36
37
# File 'lib/rack/async2sync.rb', line 35

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



35
36
37
# File 'lib/rack/async2sync.rb', line 35

def status
  @status
end

Instance Method Details

#[](response) ⇒ Object

used to register the response given by async_sinatra in the ‘async.callback’ env variable.



37
38
39
40
# File 'lib/rack/async2sync.rb', line 37

def [](response)
  @status, @headers, @body = response
  EM.stop
end