Class: HttpRouter::Node::Variable

### Home Classes Methods

### In Files

- lib/http_router/node/variable.rb

### Parent

HttpRouter::Node

### Methods

- #to_code
- #usable?

### 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::Node::Variable

### Public Instance Methods

to_code() click to toggle source

    # File lib/http_router/node/variable.rb, line 8
    def to_code
      "unless request.path_finished?
        request.params << request.path.shift
        #{super}
        request.path.unshift request.params.pop
      end"
    end

usable?(other) click to toggle source

    # File lib/http_router/node/variable.rb, line 4
    def usable?(other)
      other.class == self.class
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.