Class: HttpRouter::Request
- Inherits:
-
Object
- Object
- HttpRouter::Request
- Defined in:
- lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb
Overview
Monkey patching the Request class. Using Rack::Utils.unescape rather than URI.unescape which can’t handle utf-8 chars
Instance Method Summary collapse
-
#initialize(path, rack_request) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(path, rack_request) ⇒ Request
Returns a new instance of Request.
106 107 108 109 110 111 112 113 114 |
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 106 def initialize(path, rack_request) @rack_request = rack_request @path = Rack::Utils.unescape(path).split(/\//) @path.shift if @path.first == '' @path.push('') if path[-1] == ?/ @extra_env = {} @params = [] @acceptable_methods = Set.new end |