Class: Brut::FrontEnd::Handlers::MissingHandler

Inherits:
Brut::FrontEnd::Handler show all
Defined in:
lib/brut/front_end/handlers/missing_handler.rb

Overview

Used in development to handle a defined route but a missing page. This arranges to render a nicer error page than the default.

Defined Under Namespace

Classes: Form

Instance Method Summary collapse

Methods inherited from Brut::FrontEnd::Handler

#before_handle, #handle!

Methods included from Brut::Framework::Errors

#abstract_method!, #bug!

Methods included from Brut::FrontEnd::HandlingResults

#http_status, #redirect_to

Constructor Details

#initialize(route:) ⇒ MissingHandler

Returns a new instance of MissingHandler.



3
4
5
# File 'lib/brut/front_end/handlers/missing_handler.rb', line 3

def initialize(route:)
  @route = route
end

Instance Method Details

#handleObject



6
7
8
# File 'lib/brut/front_end/handlers/missing_handler.rb', line 6

def handle
  Brut::FrontEnd::Pages::MissingPage.new(route: @route)
end