Module: Merb::Rack::DeferrableMiddleware

Included in:
ContentLength, Head, Middleware
Defined in:
merb-core/lib/merb-core/rack/middleware.rb

Overview

Module providing delegation of the deferred? call

Merb handles support for the deferred actions supported by some evented web servers such as Thin and Ebb. To support this functionality a rack application must respond to deferred? method.

Making your middleware inherit from Merb::Rack::Middleware or by including this module you'll provide neccessary functionality to make this work.

In case you need to merbify some middleware you can just include this module. See merb-core/rack/middleware/head.rb or merb-core/rack/middleware/content_lenght.rb.

See Also:

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) deferred?(env)

Overridable:



26
27
28
# File 'merb-core/lib/merb-core/rack/middleware.rb', line 26

def deferred?(env)
  @app.deferred?(env) if @app.respond_to?(:deferred?)
end