Class: Lotus::Routing::Default Private

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

The default Rack application that responds when a resource cannot be found.

Since:

  • 0.1.0

Defined Under Namespace

Classes: NullAction

Constant Summary collapse

DEFAULT_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.

Since:

  • 0.1.0

404
DEFAULT_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.

Since:

  • 0.1.0

['Not Found'].freeze
CONTENT_TYPE =

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.

Since:

  • 0.1.0

'Content-Type'.freeze

Instance Method Summary collapse

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.

Since:

  • 0.1.0



19
20
21
22
# File 'lib/lotus/routing/default.rb', line 19

def call(env)
  action = NullAction.new.tap { |a| a.call(env) }
  [ DEFAULT_CODE, {CONTENT_TYPE => action.content_type}, DEFAULT_BODY, action ]
end