Class: Waves::Dispatchers::Base
Overview
Waves::Dispatchers::Base provides the basic request processing structure for a Rack application. It creates a Waves request, determines whether to enclose the request processing in a mutex benchmarks it, logs it, and handles redirects. Derived classes need only process the request within the safe
method, which must take a Waves::Request and return a Waves::Response.
Direct Known Subclasses
Instance Method Summary collapse
-
#call(env) ⇒ Object
As with any Rack application, a Waves dispatcher must provide a call method that takes an
env
hash. -
#deferred?(env) ⇒ Boolean
Called by event driven servers like thin and ebb.
Instance Method Details
#call(env) ⇒ Object
As with any Rack application, a Waves dispatcher must provide a call method that takes an env
hash.
18 19 20 21 22 23 24 |
# File 'lib/waves/dispatchers/base.rb', line 18 def call( env ) response = if Waves.synchronize? || Waves.debug? Waves.synchronize { Waves.reload ; _call( env ) } else _call( env ) end end |