Class: SoarScRouting::BaseRouter
- Inherits:
-
Object
- Object
- SoarScRouting::BaseRouter
- Defined in:
- lib/soar_sc_routing/base_router.rb
Instance Attribute Summary collapse
-
#route_meta ⇒ Object
readonly
Returns the value of attribute route_meta.
Instance Method Summary collapse
-
#initialize(route_meta) ⇒ BaseRouter
constructor
A new instance of BaseRouter.
- #redirect_to(url, http_code = 302) ⇒ Object
- #route(request) ⇒ Object
Constructor Details
#initialize(route_meta) ⇒ BaseRouter
Returns a new instance of BaseRouter.
7 8 9 |
# File 'lib/soar_sc_routing/base_router.rb', line 7 def initialize() = end |
Instance Attribute Details
#route_meta ⇒ Object (readonly)
Returns the value of attribute route_meta.
5 6 7 |
# File 'lib/soar_sc_routing/base_router.rb', line 5 def end |
Instance Method Details
#redirect_to(url, http_code = 302) ⇒ Object
18 19 20 |
# File 'lib/soar_sc_routing/base_router.rb', line 18 def redirect_to(url, http_code = 302) [http_code, {'Location' => url, 'Content-Type' => 'text/html', 'Content-Length' => '0'}, []] end |
#route(request) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/soar_sc_routing/base_router.rb', line 11 def route(request) route_path(request) rescue => ex excepted(ex) end |