Sha256: ff2461bd594d08f18cfb132c6ca67df756bd1b168aaabc77eb005beea2abaa4c
Contents?: true
Size: 364 Bytes
Versions: 2
Compression:
Stored size: 364 Bytes
Contents
module Ixtlan class ChildPath def initialize(app, rootpath) @app = app @rootpath = rootpath end def call(env) ['REQUEST_PATH','PATH_INFO','REQUEST_URI','SCRIPT_NAME'].each do |key| if(env[key] =~ /[.]xml$/) env[key].gsub!(/^\/#{@rootpath}/, "") end end @app.call(env) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ixtlan-0.2.3 | lib/ixtlan/child_path.rb |
ixtlan-0.2.2 | lib/ixtlan/child_path.rb |