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



15
16
17
# File 'lib/hanami/components/routes_inspector.rb', line 15

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



25
26
27
28
29
# File 'lib/hanami/components/routes_inspector.rb', line 25

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