Parent

Methods

Class Index [+]

Quicksearch

ActionDispatch::Static

Public Class Methods

new(app, path, cache_control=nil) click to toggle source
    # File lib/action_dispatch/middleware/static.rb, line 47
47:     def initialize(app, path, cache_control=nil)
48:       @app = app
49:       @file_handler = FileHandler.new(path, cache_control)
50:     end

Public Instance Methods

call(env) click to toggle source
    # File lib/action_dispatch/middleware/static.rb, line 52
52:     def call(env)
53:       case env['REQUEST_METHOD']
54:       when 'GET', 'HEAD'
55:         path = env['PATH_INFO'].chomp('/')
56:         if match = @file_handler.match?(path)
57:           env["PATH_INFO"] = match
58:           return @file_handler.call(env)
59:         end
60:       end
61: 
62:       @app.call(env)
63:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.