Parent

Files

HttpRouter::Request

Attributes

continue[RW]
extra_env[RW]
matches[R]
params[RW]
passed_with[RW]
path[RW]
rack[RW]
rack_request[RW]

Public Class Methods

new(path, rack_request, perform_call) click to toggle source
# File lib/http_router/request.rb, line 6
def initialize(path, rack_request, perform_call)
  @rack_request, @perform_call = rack_request, perform_call
  @path = URI.unescape(path).split(/\//)
  @path.shift if @path.first == ''
  @path.push('') if path[-1] == //
  @extra_env = {}
  @params = []
  @matches = []
end

Public Instance Methods

joined_path() click to toggle source
# File lib/http_router/request.rb, line 16
def joined_path
  @path * '/'
end
matched_route(response) click to toggle source
# File lib/http_router/request.rb, line 20
def matched_route(response)
  @matches << response
end
path_finished?() click to toggle source
# File lib/http_router/request.rb, line 36
def path_finished?
  @path.size == 0 or @path.size == 1 && @path.first == ''
end
perform_call() click to toggle source
# File lib/http_router/request.rb, line 24
def perform_call
  @perform_call == true
end
testing_405?() click to toggle source
# File lib/http_router/request.rb, line 28
def testing_405?
  @perform_call == 405
end
to_s() click to toggle source
# File lib/http_router/request.rb, line 32
def to_s
  "request path, #{path.inspect}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.