class ActionDispatch::Journey::Formatter

def extract_parameterized_parts(route, options, recall)

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

def extract_parameterized_parts: (ActionDispatch::Journey::Route route, Hash options, Hash recall) -> untyped

This signature was generated using 1 sample from 1 application.

def extract_parameterized_parts(route, options, recall)
  parameterized_parts = recall.merge(options)
  keys_to_keep = route.parts.reverse_each.drop_while { |part|
    !(options.key?(part) || route.scope_options.key?(part)) || (options[part].nil? && recall[part].nil?)
  } | route.required_parts
  parameterized_parts.delete_if do |bad_key, _|
    !keys_to_keep.include?(bad_key)
  end
  parameterized_parts.each do |k, v|
    if k == :controller
      parameterized_parts[k] = v
    else
      parameterized_parts[k] = v.to_param
    end
  end
  parameterized_parts.compact!
  parameterized_parts
end