How to get a list of all routes used in a Hanami app?

250 Views Asked by At

We have a way to get all the routes used in Rails and Sinatra as below

Rails: Rails.application.routes.routes

Sinatra: Sinatra::Application.routes

Similarly, How can we get all the routes used in Hanami app?

1

There are 1 best solutions below

0
On

You can use the below:

#routes(blk) ⇒ Object

#routes(path) ⇒ Object

#routes ⇒ Hanami::Config::Routes

Specify a set of routes for the application, by passing a block, or a relative path where to find the file that describes them.