class ActionView::Resolver::PathParser

def parse(path)

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

def parse: (ActionView::TemplatePath path) -> ActionView::Resolver::PathParser::ParsedPath

This signature was generated using 1 sample from 1 application.

def parse(path)
  @regex ||= build_path_regex
  match = @regex.match(path)
  path = TemplatePath.build(match[:action], match[:prefix] || "", !!match[:partial])
  details = TemplateDetails.new(
    match[:locale]&.to_sym,
    match[:handler]&.to_sym,
    match[:format]&.to_sym,
    match[:variant]&.to_sym
  )
  ParsedPath.new(path, details)
end