Class: Brut::CLI::Apps::Scaffold::Action::Route

Inherits:
FrontEnd::Routing::FormRoute show all
Defined in:
lib/brut/cli/apps/scaffold.rb

Instance Attribute Summary

Attributes inherited from FrontEnd::Routing::FormRoute

#form_class

Attributes inherited from FrontEnd::Routing::Route

#handler_class, #http_method, #path_template

Instance Method Summary collapse

Methods inherited from FrontEnd::Routing::Route

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

Constructor Details

#initialize(path_template) ⇒ Route

Returns a new instance of Route.



398
399
400
401
# File 'lib/brut/cli/apps/scaffold.rb', line 398

def initialize(path_template)
  path_template = "/#{path_template}".gsub(/\/\//,"/")
  super(path_template)
end

Instance Method Details

#locate_handler_class(suffix, preposition, on_missing: :raise) ⇒ Object



402
403
404
405
406
407
408
409
# File 'lib/brut/cli/apps/scaffold.rb', line 402

def locate_handler_class(suffix,preposition, on_missing: :raise)
  begin
    super(suffix,preposition,on_missing: :raise).name.split(/::/)
  rescue Brut::Framework::Errors::NoClassForPath => ex
    class_name_path = ex.class_name_path
    ex.class_name_path
  end
end