Module: Hanami::Action::Rack

Defined in:
lib/hanami/action/rack.rb,
lib/hanami/action/rack/file.rb,
lib/hanami/action/rack/errors.rb,
lib/hanami/action/rack/callable.rb

Overview

Rack integration API

Since:

  • 0.1.0

Defined Under Namespace

Modules: Callable, ClassMethods, Errors, InstanceMethods Classes: File

Constant Summary collapse

RESPONSE_CODE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Rack SPEC response code

Since:

  • 1.0.0

0
RESPONSE_HEADERS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Rack SPEC response headers

Since:

  • 1.0.0

1
RESPONSE_BODY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Rack SPEC response body

Since:

  • 1.0.0

2
DEFAULT_RESPONSE_CODE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

The default HTTP response code

Since:

  • 0.1.0

200
NOT_FOUND =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Not Found

Since:

  • 1.0.0

404
DEFAULT_RESPONSE_BODY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

The default Rack response body

Since:

  • 0.1.0

[]
DEFAULT_REQUEST_ID_LENGTH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

The default HTTP Request ID length

See Also:

  • #request_id

Since:

  • 0.3.0

16
REQUEST_METHOD =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

The request method

Since:

  • 0.3.2

'REQUEST_METHOD'.freeze
CONTENT_LENGTH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

The Content-Length HTTP header

Since:

  • 1.0.0

'Content-Length'.freeze
X_CASCADE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

The non-standard HTTP header to pass the control over when a resource cannot be found by the current endpoint

Since:

  • 1.0.0

'X-Cascade'.freeze
HEAD =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

HEAD request

Since:

  • 0.3.2

'HEAD'.freeze
ROUTER_PARSED_BODY =

The key that returns router parsed body from the Rack env

Since:

  • 0.1.0

'router.parsed_body'.freeze
FILE_SYSTEM_ROOT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

This is the root directory for `#unsafe_send_file`

See Also:

  • #unsafe_send_file

Since:

  • 1.3.3

Pathname.new("/").freeze

Class Method Summary collapse

Class Method Details

.included(base) ⇒ 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.

Override Ruby's hook for modules. It includes basic Hanami::Action modules to the given class.

Parameters:

  • base (Class)

    the target action

See Also:

Since:

  • 0.1.0


103
104
105
106
107
108
# File 'lib/hanami/action/rack.rb', line 103

def self.included(base)
  base.class_eval do
    extend ClassMethods
    prepend InstanceMethods
  end
end