:api: plugin
# File lib/merb-core/rack/middleware/path_prefix.rb, line 18 def call(env) strip_path_prefix(env) @app.call(env) end
:api: plugin
# File lib/merb-core/rack/middleware/path_prefix.rb, line 12 def deferred?(env) strip_path_prefix(env) @app.deferred?(env) end
:api: private
# File lib/merb-core/rack/middleware/path_prefix.rb, line 24 def strip_path_prefix(env) ['PATH_INFO', 'REQUEST_URI'].each do |path_key| if env[path_key] =~ @path_prefix env[path_key].sub!(@path_prefix, Merb::Const::EMPTY_STRING) env[path_key] = Merb::Const::SLASH if env[path_key].empty? end end end
Generated with the Darkfish Rdoc Generator 2.