Class: Hanami::Routes

Inherits:
Object show all
Defined in:
gems/gems/hanami-2.1.0/lib/hanami/routes.rb

Overview

App routes

Users are expected to inherit from this class to define their app routes.

Examples:

# config/routes.rb
# frozen_string_literal: true

require "hanami/routes"

module MyApp
  class Routes < Hanami::Routes
    root to: "home.show"
  end
end

See {Hanami::Slice::Router} for the syntax allowed within the `define` block.

See Also:

Since:

  • 2.0.0