Class: Hanami::Routing::ClassEndpoint Private

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

Routing endpoint This is the object that responds to an HTTP request made against a certain path.

The router will use this class for:

* Classes
* Hanami::Action endpoints referenced as a class
* Hanami::Action endpoints referenced a string
* RESTful resource(s)

Examples:

require 'hanami/router'

Hanami::Router.new do
  get '/class',               to: RackMiddleware
  get '/hanami-action-class',  to: Dashboard::Index
  get '/hanami-action-string', to: 'dashboard#index'

  resource  'identity'
  resources 'articles'
end

Since:

  • 0.1.0

Instance Method Summary collapse

Methods inherited from Endpoint

#destination_path, #inspect, #redirect?, #routable?

Instance Method Details

#call(env) ⇒ Object

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.

Rack interface

Since:

  • 0.1.0



100
101
102
# File 'lib/hanami/routing/endpoint.rb', line 100

def call(env)
  __getobj__.new.call(env)
end