Class: Merb::Rack::Middleware

Inherits:
Object
  • Object
show all
Includes:
DeferrableMiddleware
Defined in:
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.

Direct Known Subclasses

ConditionalGet, PathPrefix, Profiler, Static, Tracer

Instance Method Summary collapse

Methods included from DeferrableMiddleware

#deferred?

Constructor Details

#initialize(app) ⇒ Middleware

Returns a new instance of Middleware.



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

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



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

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