class method
self.new
Ruby on Rails 5.2.8.1
Since v3.1.12Signature
self.new(root, index: "index", headers: {})
No documentation comment.
Parameters
-
rootreq -
indexkey = "index" -
headerskey = {}
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 18
def initialize(root, index: "index", headers: {})
@root = root.chomp("/").b
@file_server = ::Rack::File.new(@root, headers)
@index = index
end
Defined in actionpack/lib/action_dispatch/middleware/static.rb line 18
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler