# File lib/http_router/request.rb, line 8 def initialize(path, rack_request) @rack_request = rack_request @path = URI.unescape(path).split(/\//) @path.shift if @path.first == '' @path.push('') if path[-1] == / @extra_env = {} @params = [] @acceptable_methods = Set.new end
# File lib/http_router/request.rb, line 18 def joined_path @path * '/' end
# File lib/http_router/request.rb, line 26 def path_finished? @path.size == 0 or @path.size == 1 && @path.first == '' end
# File lib/http_router/request.rb, line 22 def to_s "request path, #{path.inspect}" end