Class: Brut::FrontEnd::Routing::MissingHandler

Inherits:
Route
  • Object
show all
Defined in:
lib/brut/front_end/routing.rb

Direct Known Subclasses

MissingForm

Instance Attribute Summary collapse

Attributes inherited from Route

#handler_class, #http_method, #path_template

Instance Method Summary collapse

Methods inherited from Route

#==, #path, #path_params, #url

Constructor Details

#initialize(path_template, ex) ⇒ MissingHandler

Returns a new instance of MissingHandler.



317
318
319
320
321
322
323
324
325
326
327
# File 'lib/brut/front_end/routing.rb', line 317

def initialize(path_template,ex)
  @http_method   = Brut::FrontEnd::HttpMethod.new(:post)
  @path_template = path_template
  @handler_class = begin
                     handler_class = Class.new(Brut::FrontEnd::Handlers::MissingHandler)
                     compressed_class_name = ex.class_name_path.join
                     Module.const_set(:"BrutMissingHandlers#{compressed_class_name}",handler_class)
                     handler_class
                   end
  @exception     = ex
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



316
317
318
# File 'lib/brut/front_end/routing.rb', line 316

def exception
  @exception
end