can I get all routes in my rails application? I need an output like
You could have a look at way rails spits out those routes from the rake task. It's in
/gems/rails/2.3.x/lib/tasks/routes.rake for Rails 2. Seems to be basically doing
ActionController::Routing::Routes.routes in the general case and then interrogating that.