Class: ActionDispatch::Routing::ConsoleFormatter::Unused
- Defined in:
- actionpack/lib/action_dispatch/routing/inspector.rb
Instance Method Summary collapse
Methods inherited from Sheet
#footer, #section, #section_title
Methods inherited from Base
#footer, #initialize, #result, #section, #section_title
Constructor Details
This class inherits a constructor from ActionDispatch::Routing::ConsoleFormatter::Base
Instance Method Details
#header(routes) ⇒ Object
312 313 314 315 316 317 318 |
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 312 def header(routes) @buffer << <<~MSG Found #{routes.count} unused #{"route".pluralize(routes.count)}: MSG super end |
#no_routes(engine, routes, filter) ⇒ Object
320 321 322 323 324 325 326 327 328 329 |
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 320 def no_routes(engine, routes, filter) @buffer << if filter.none? "No unused routes found." elsif filter.key?(:controller) "No unused routes found for this controller." elsif filter.key?(:grep) "No unused routes found for this grep pattern." end end |