Class: Hanami::Slice::RoutesHelper
- Inherits:
-
Object
- Object
- Hanami::Slice::RoutesHelper
- Defined in:
- lib/hanami/slice/routes_helper.rb
Overview
Hanami app routes helpers
An instance of this class will be registered with slice (at the “routes” key). You can use it to access the route helpers for your app.
Instance Method Summary collapse
-
#initialize(router) ⇒ RoutesHelper
constructor
private
A new instance of RoutesHelper.
- #path ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(router) ⇒ RoutesHelper
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RoutesHelper.
18 19 20 |
# File 'lib/hanami/slice/routes_helper.rb', line 18 def initialize(router) @router = router end |
Instance Method Details
#path ⇒ Object
23 24 25 |
# File 'lib/hanami/slice/routes_helper.rb', line 23 def path(...) router.path(...) end |
#url ⇒ Object
28 29 30 |
# File 'lib/hanami/slice/routes_helper.rb', line 28 def url(...) router.url(...) end |