Class: ActionDispatch::Routing::ConsoleFormatter::Unused
- Defined in:
- 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
284 285 286 287 288 289 290 |
# File 'lib/action_dispatch/routing/inspector.rb', line 284 def header(routes) @buffer << <<~MSG Found #{routes.count} unused #{"route".pluralize(routes.count)}: MSG super end |
#no_routes(engine, routes, filter) ⇒ Object
292 293 294 295 296 297 298 299 300 301 |
# File 'lib/action_dispatch/routing/inspector.rb', line 292 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 |