Class: HttpRouter::Request

### Home Classes Methods

### In Files

- lib/http_router/request.rb

### Parent

Object

### Methods

- ::new
- #joined_path
- #path_finished?
- #to_s

### Files

- LICENSE

### Class/Module Index

Quicksearch

- HttpRouter
- HttpRouter::GenerationHelper
- HttpRouter::Generator
- HttpRouter::Generator::PathGenerator
- HttpRouter::Node
- HttpRouter::Node::AbstractRequestNode
- HttpRouter::Node::FreeRegex
- HttpRouter::Node::Glob
- HttpRouter::Node::GlobRegex
- HttpRouter::Node::Host
- HttpRouter::Node::Lookup
- HttpRouter::Node::Path
- HttpRouter::Node::Regex
- HttpRouter::Node::RequestMethod
- HttpRouter::Node::Root
- HttpRouter::Node::Scheme
- HttpRouter::Node::SpanningRegex
- HttpRouter::Node::UserAgent
- HttpRouter::Node::Variable
- HttpRouter::RegexRouteGeneration
- HttpRouter::Request
- HttpRouter::Response
- HttpRouter::Route
- HttpRouter::RouteHelper
- HttpRouter::Util

No matching classes.

# 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.