Class: Merb::Rack::Middleware

Inherits:
Object
  • Object
show all
Includes:
DeferrableMiddleware
Defined in:
merb-core/lib/merb-core/rack/middleware.rb

Overview

Base class for the Merb middlewares

When you need to write your own middleware for Merb you should this class as a base class to make sure middleware has expected interface.

In case you need to Merbify some middleware you can use Merb::Rack::DeferrableMiddleware module to add deferred actions support.

See Also:

Direct Known Subclasses

ConditionalGet, PathPrefix, Profiler, Static, Tracer

Instance Method Summary (collapse)

Methods included from DeferrableMiddleware

#deferred?

Constructor Details

- (Middleware) initialize(app)

Returns a new instance of Middleware

Overridable:



47
48
49
# File 'merb-core/lib/merb-core/rack/middleware.rb', line 47

def initialize(app)
  @app = app
end

Instance Method Details

- (Object) call(env)

Overridable:



53
54
55
# File 'merb-core/lib/merb-core/rack/middleware.rb', line 53

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