Parent

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 137
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 147
def [] x
  idx = @offsets[x - 1] + x
  @match[idx]
end
captures() click to toggle source
# File lib/journey/path/pattern.rb, line 143
def captures
  (length - 1).times.map { |i| self[i + 1] }
end
length() click to toggle source
# File lib/journey/path/pattern.rb, line 152
def length
  @offsets.length
end
post_match() click to toggle source
# File lib/journey/path/pattern.rb, line 156
def post_match
  @match.post_match
end
to_s() click to toggle source
# File lib/journey/path/pattern.rb, line 160
def to_s
  @match.to_s
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.