method

offsets

Importance_0
offsets() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/journey/path/pattern.rb, line 182
          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
Register or log in to add new notes.