Object
# File lib/action_dispatch/middleware/static.rb, line 25 25: def call(env) 26: @file_server.call(env) 27: end
# File lib/action_dispatch/middleware/static.rb, line 40 40: def escape_glob_chars(path) 41: path.force_encoding('binary') if path.respond_to? :force_encoding 42: path.gsub(/[*?{}\[\]]/, "\\\\\\&") 43: end
# File lib/action_dispatch/middleware/static.rb, line 29 29: def ext 30: @ext ||= begin 31: ext = ::ActionController::Base.page_cache_extension 32: "{,#{ext},/index#{ext}}" 33: end 34: end
# File lib/action_dispatch/middleware/static.rb, line 11 11: def match?(path) 12: path = path.dup 13: 14: full_path = path.empty? ? @root : File.join(@root, escape_glob_chars(unescape_path(path))) 15: paths = "#{full_path}#{ext}" 16: 17: matches = Dir[paths] 18: match = matches.detect { |m| File.file?(m) } 19: if match 20: match.sub!(@compiled_root, '') 21: ::Rack::Utils.escape(match) 22: end 23: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.