instance method
widths
Ruby on Rails 5.2.8.1
Since v4.0.13 Last seen in v5.2.8.1 PrivateSignature
widths(routes)
No documentation comment.
Parameters
-
routesreq
Source
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 180
def widths(routes)
[routes.map { |r| r[:name].length }.max || 0,
routes.map { |r| r[:verb].length }.max || 0,
routes.map { |r| r[:path].length }.max || 0]
end
Defined in actionpack/lib/action_dispatch/routing/inspector.rb line 180
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::ConsoleFormatter