Sha256: 4780217499e074b607ceb4f49e350e4f00d49fcb2ec771c0b03c657fbce6e341
Contents?: true
Size: 573 Bytes
Versions: 1
Compression:
Stored size: 573 Bytes
Contents
module Lotus module Routing # The default Rack application that responds when a resource cannot be found. # # @since 0.1.0 # @api private class Default DEFAULT_CODE = 404 DEFAULT_BODY = ['Not Found'].freeze CONTENT_TYPE = 'Content-Type'.freeze class NullAction include Lotus::Action def call(env) end end def call(env) action = NullAction.new.tap {|a| a.call(env) } [ DEFAULT_CODE, {CONTENT_TYPE => action.content_type}, DEFAULT_BODY, action ] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lotusrb-0.1.0 | lib/lotus/routing/default.rb |