class ActionDispatch::Journey::Path::Pattern

def offsets

Experimental RBS support (using type sampling data from the type_fusion project).

def offsets: () -> Array[Integer]

This signature was generated using 4 samples from 1 application.

def offsets
  return @offsets if @offsets
  @offsets = [0]
  spec.find_all(&:symbol?).each do |node|
    node = node.to_sym
    if @requirements.key?(node)
      re = /#{Regexp.union(@requirements[node])}|/
      @offsets.push((re.match("").length - 1) + @offsets.last)
    else
      @offsets << @offsets.last
    end
  end
  @offsets
end