class HttpRouter::Request
Attributes
acceptable_methods[R]
called[RW]
called?[RW]
continue[RW]
extra_env[RW]
params[RW]
passed_with[RW]
path[RW]
rack[RW]
rack_request[RW]
Public Class Methods
new(path, rack_request)
click to toggle source
# 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
Public Instance Methods
joined_path()
click to toggle source
# File lib/http_router/request.rb, line 18 def joined_path @path * '/' end
path_finished?()
click to toggle source
# File lib/http_router/request.rb, line 26 def path_finished? @path.size == 0 or @path.size == 1 && @path.first == '' end
to_s()
click to toggle source
# File lib/http_router/request.rb, line 22 def to_s "request path, #{path.inspect}" end