Parent

Methods

Rack::NotFound

Rack::NotFound is a default endpoint. Initialize with the path to your 404 page.

Constants

F

Public Class Methods

new(path) click to toggle source
# File lib/rack/contrib/not_found.rb, line 8
def initialize(path)
  file = F.expand_path(path)
  @content = F.read(file)
  @length = @content.size.to_s
end

Public Instance Methods

call(env) click to toggle source
# File lib/rack/contrib/not_found.rb, line 14
def call(env)
  [404, {'Content-Type' => 'text/html', 'Content-Length' => @length}, [@content]]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.