Class: Hanami::Commands::Routes Private

Inherits:
Object
  • Object
show all
Defined in:
lib/hanami/commands/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.

Display application/container routes.

It is run with:

`bundle exec hanami routes`

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Routes

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.

Returns a new instance of Routes.

Parameters:

  • options (Hash)

    Environment’s options

See Also:

Since:

  • 0.1.0



16
17
18
19
# File 'lib/hanami/commands/routes.rb', line 16

def initialize(options)
  @environment = Hanami::Environment.new(options)
  @environment.require_application_environment
end

Instance Method Details

#startObject

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.

Display to STDOUT application routes

Since:

  • 0.1.0



24
25
26
# File 'lib/hanami/commands/routes.rb', line 24

def start
  puts app.routes.inspector.to_s
end