Class: Journey::Path::Pattern::MatchData

### Home Classes Methods

### In Files

- lib/journey/path/pattern.rb

### Parent

Object

### Methods

- ::new
- #[]
- #captures
- #length
- #post_match
- #to_s

### Files

- CHANGELOG.rdoc
- Manifest.txt
- README.rdoc

### Class/Module Index

Quicksearch

- Journey
- Journey::Formatter
- Journey::GTG
- Journey::GTG::Builder
- Journey::GTG::MatchData
- Journey::GTG::Simulator
- Journey::GTG::TransitionTable
- Journey::NFA
- Journey::NFA::Builder
- Journey::NFA::MatchData
- Journey::NFA::Simulator
- Journey::NFA::TransitionTable
- Journey::NFA::Visitor
- Journey::Nodes
- Journey::Nodes::Binary
- Journey::Nodes::Cat
- Journey::Nodes::Dummy
- Journey::Nodes::Group
- Journey::Nodes::Literal
- Journey::Nodes::Or
- Journey::Nodes::Star
- Journey::Nodes::Symbol
- Journey::Nodes::Terminal
- Journey::Nodes::Unary
- Journey::Parser
- Journey::Path
- Journey::Path::Pattern
- Journey::Path::Pattern::MatchData
- Journey::Route
- Journey::Router
- Journey::Router::RoutingError
- Journey::Router::Strexp
- Journey::Router::Utils
- Journey::Router::Utils::UriEscape
- Journey::Routes
- Journey::Scanner
- Rack

No matching classes.

# Journey::Path::Pattern::MatchData

### Attributes

names[R]

### Public Class Methods

new(names, offsets, match) click to toggle source

    # File lib/journey/path/pattern.rb, line 138
    def initialize names, offsets, match
      @names   = names
      @offsets = offsets
      @match   = match
    end

### Public Instance Methods

[](x) click to toggle source

    # File lib/journey/path/pattern.rb, line 148
    def [] x
      idx = @offsets[x - 1] + x
      @match[idx]
    end

captures() click to toggle source

    # File lib/journey/path/pattern.rb, line 144
    def captures
      (length - 1).times.map { |i| self[i + 1] }
    end

length() click to toggle source

    # File lib/journey/path/pattern.rb, line 153
    def length
      @offsets.length
    end

post_match() click to toggle source

    # File lib/journey/path/pattern.rb, line 157
    def post_match
      @match.post_match
    end

to_s() click to toggle source

    # File lib/journey/path/pattern.rb, line 161
    def to_s
      @match.to_s
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.