Class: Hanami::Components::RoutesInspector Private

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

Project's routes inspector

Since:

  • 0.9.0

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ RoutesInspector

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 RoutesInspector

Parameters:

Since:

  • 0.9.0


17
18
19
# File 'lib/hanami/components/routes_inspector.rb', line 17

def initialize(configuration)
  @configuration = configuration
end

Instance Method Details

#inspectString

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 printable version of the project routes

Returns:

  • (String)

    printable routes

Since:

  • 0.9.0


27
28
29
30
31
# File 'lib/hanami/components/routes_inspector.rb', line 27

def inspect
  routes.map do |r|
    r.inspector.to_s
  end.join("\n")
end