class Rails::Command::RoutesCommand

:nodoc:

def formatter

def formatter
  if options.key?("expanded")
    ActionDispatch::Routing::ConsoleFormatter::Expanded.new
  else
    ActionDispatch::Routing::ConsoleFormatter::Sheet.new
  end
end

def inspector

def inspector
  ActionDispatch::Routing::RoutesInspector.new(Rails.application.routes.routes)
end

def invoke_command(*)

def invoke_command(*)
  if options.key?("unused")
    Rails::Command.invoke "unused_routes", ARGV
  else
    super
  end
end

def perform(*)

def perform(*)
  boot_application!
  require "action_dispatch/routing/inspector"
  say inspector.format(formatter, routes_filter)
end

def routes_filter

def routes_filter
  options.symbolize_keys.slice(:controller, :grep)
end