Class: Merb::Rack::Middleware
- Inherits:
-
Object
show all
- Defined in:
- lib/merb-core/rack/middleware.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Middleware.
5
6
7
|
# File 'lib/merb-core/rack/middleware.rb', line 5
def initialize(app)
@app = app
end
|
Instance Method Details
#call(env) ⇒ Object
19
20
21
|
# File 'lib/merb-core/rack/middleware.rb', line 19
def call(env)
@app.call(env)
end
|
#deferred?(env) ⇒ Boolean
9
10
11
12
13
14
15
16
17
|
# File 'lib/merb-core/rack/middleware.rb', line 9
def deferred?(env)
path = env['PATH_INFO'] ? env['PATH_INFO'].chomp('/') : ""
if path =~ Merb.deferred_actions
Merb.logger.info! "Deferring Request: #{path}"
true
else
false
end
end
|