Rocket::Route
Inherits Reference < Object
A Route is defined by:
- an HTTP method
- an URL path
- a controller instance
- the action to call
Constructors
new(method : String, path : String, controller : Controller, action : String)
Stores information and generate regex for the router to match the correct path.
Instance methods
action
Sourcecall_action(context)
Store the current context in the controller, extract parameters from it, call the action then return the result.
controller
Sourcemethod
Sourceparam_names
Sourcepath
Sourceregex
Source