method
new
v4.2.7 -
Show latest stable
- Class:
ActionDispatch::FileHandler
new(root, cache_control)public
No documentation available.
# File actionpack/lib/action_dispatch/middleware/static.rb, line 16
def initialize(root, cache_control)
@root = root.chomp('/')
@compiled_root = /^#{Regexp.escape(root)}/
headers = cache_control && { 'Cache-Control' => cache_control }
@file_server = ::Rack::File.new(@root, headers)
end