method
build_cache
rails latest stable - Class:
ActionDispatch::Journey::Formatter
build_cache()private
No documentation available.
# File actionpack/lib/action_dispatch/journey/formatter.rb, line 161
def build_cache
root = { ___routes: [] }
routes.routes.each_with_index do |route, i|
leaf = route.required_defaults.inject(root) do |h, tuple|
h[tuple] ||= {}
end
(leaf[:___routes] ||= []) << [i, route]
end
root
end