Class: Lotus::Routing::Default Private
- Inherits:
-
Object
- Object
- Lotus::Routing::Default
- 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.
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.
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.
['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.
'Content-Type'.freeze
Instance Method Summary collapse
- #call(env) ⇒ Object private
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.
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 |