class Noder::HTTP::Listeners::NotFound

Public Instance Methods

call(env) click to toggle source
# File lib/noder/http/listeners/not_found.rb, line 5
def call(env)
  callback.call(env) if callback
  response = env[:response]
  render_not_found(response) unless response.is_rendered?
  env
end
render_not_found(response) click to toggle source
# File lib/noder/http/listeners/not_found.rb, line 12
def render_not_found(response)
  response.status_code = 404
  response.write('Not Found')
  response.end
end