Class: Brut::FrontEnd::Routing::MissingPath

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

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(method, path_template, ex) ⇒ MissingPath

Returns a new instance of MissingPath.



332
333
334
335
336
337
338
339
340
341
342
# File 'lib/brut/front_end/routing.rb', line 332

def initialize(method,path_template,ex)
  @http_method   = Brut::FrontEnd::HttpMethod.new(method)
  @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.



331
332
333
# File 'lib/brut/front_end/routing.rb', line 331

def exception
  @exception
end