Class: Hanami::CLI::Commands::App::Routes Private
- Inherits:
-
Hanami::CLI::Command
- Object
- Dry::CLI::Command
- Hanami::CLI::Command
- Hanami::CLI::Commands::App::Routes
- Defined in:
- lib/hanami/cli/commands/app/routes.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Inspect the application routes
All the formatters available from hanami-router
are available:
$ bundle exec hanami routes --format=csv
Experimental: You can also use a custom formatter registered in the application container. You can identify it by its key:
$ bundle exec hanami routes --format=custom_routes_formatter
Instance Method Summary collapse
Methods inherited from Hanami::CLI::Command
Constructor Details
This class inherits a constructor from Hanami::CLI::Command
Instance Method Details
#call(format: DEFAULT_FORMAT) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 57 58 59 60 |
# File 'lib/hanami/cli/commands/app/routes.rb', line 54 def call(format: DEFAULT_FORMAT, **) require "hanami/router/inspector" require "hanami/prepare" inspector = Hanami::Router::Inspector.new(formatter: resolve_formatter(format)) app.router(inspector: inspector) out.puts inspector.call end |