Class: Rack::Stream

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/stream.rb,
lib/rack/stream/app.rb,
lib/rack/stream/dsl.rb,
lib/rack/stream/handlers.rb,
lib/rack/stream/handlers/http.rb,
lib/rack/stream/deferrable_body.rb,
lib/rack/stream/handlers/web_socket.rb,
lib/rack/stream/handlers/event_source.rb

Overview

Middleware for building multi-protocol streaming rack endpoints.

Defined Under Namespace

Modules: DSL, Handlers Classes: App, DeferrableBody

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ Stream

Returns a new instance of Stream.



19
20
21
# File 'lib/rack/stream.rb', line 19

def initialize(app, options={})
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



23
24
25
# File 'lib/rack/stream.rb', line 23

def call(env)
  App.new(@app).call(env)
end