class ActionDispatch::Journey::Formatter
def match_route(name, options)
Experimental RBS support (using type sampling data from the type_fusion
project).
def match_route: (String name, Hash options) -> nil
This signature was generated using 1 sample from 1 application.
def match_route(name, options) if named_routes.key?(name) yield named_routes[name] else routes = non_recursive(cache, options) supplied_keys = options.each_with_object({}) do |(k, v), h| h[k.to_s] = true if v end hash = routes.group_by { |_, r| r.score(supplied_keys) } hash.keys.sort.reverse_each do |score| break if score < 0 hash[score].sort_by { |i, _| i }.each do |_, route| yield route end end end end