module Rack::App::RequestConfigurator
Constants
- EXTNAME
- ORIGINAL_PATH_INFO
- PATH_INFO
Public Instance Methods
configure(env)
click to toggle source
# File lib/rack/app/request_configurator.rb, line 5 def configure(env) set_path_info(env) set_extname(env) end
Protected Instance Methods
set_extname(env)
click to toggle source
# File lib/rack/app/request_configurator.rb, line 22 def set_extname(env) path_info = env[PATH_INFO] basename = path_info.split("/").last.to_s env[EXTNAME]= File.extname(basename) end
set_path_info(env)
click to toggle source
# File lib/rack/app/request_configurator.rb, line 16 def set_path_info(env) path_info = env[PATH_INFO] env[ORIGINAL_PATH_INFO]= path_info.dup env[PATH_INFO]= Rack::App::Utils.normalize_path(path_info) end