Class: Routemaster::Drain::Basic
- Inherits:
-
Object
- Object
- Routemaster::Drain::Basic
- Extended by:
- Forwardable
- Defined in:
- lib/routemaster/drain/basic.rb
Overview
Rack application which authenticates, parses, and broadcasts events received from Routemaster.
See the various corresponding middleware for details on operation: Middleware::Authenticate, Middleware::Parse, and terminates with Terminator.
Instance Method Summary collapse
-
#call(env) ⇒ Object
delegate :call => :@app.
-
#initialize(options = {}) ⇒ Basic
constructor
A new instance of Basic.
Methods included from Forwardable
Constructor Details
#initialize(options = {}) ⇒ Basic
Returns a new instance of Basic.
20 21 22 23 24 25 26 27 28 |
# File 'lib/routemaster/drain/basic.rb', line 20 def initialize( = {}) @terminator = terminator = Terminator.new @app = ::Rack::Builder.app do use Middleware::RootPostOnly use Middleware::Authenticate, use Middleware::Parse run terminator end end |
Instance Method Details
#call(env) ⇒ Object
delegate :call => :@app
32 33 34 |
# File 'lib/routemaster/drain/basic.rb', line 32 def call(env) @app.call(env) end |