Sha256: 41cd4552bdc6d18680de72e485ddcf6934814f9a8637e5fb64d785d2919917b2

Contents?: true

Size: 508 Bytes

Versions: 8

Compression:

Stored size: 508 Bytes

Contents

require "rack/response"
class Rack::App::Router::NotFound < Rack::App::Router::Base

  def fetch_context(request_method, path_info)
    {:app => lambda{|env| not_found_response }}
  end

  def fetch_endpoint(request_method, path_info)
    ::Rack::App::Endpoint::NOT_FOUND
  end

  protected

  def not_found_response
    rack_response = Rack::Response.new
    rack_response.status = 404
    rack_response.write('404 Not Found')
    rack_response.finish
  end
  
  def compile_registered_endpoints!
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-app-5.4.0 lib/rack/app/router/not_found.rb
rack-app-5.3.2 lib/rack/app/router/not_found.rb
rack-app-5.3.1 lib/rack/app/router/not_found.rb
rack-app-5.3.0 lib/rack/app/router/not_found.rb
rack-app-5.2.0 lib/rack/app/router/not_found.rb
rack-app-5.1.0 lib/rack/app/router/not_found.rb
rack-app-5.0.0 lib/rack/app/router/not_found.rb
rack-app-5.0.0.rc2 lib/rack/app/router/not_found.rb