class Hanami::Slice::RoutesHelper

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.

@example

MyApp::App["routes"].path(:root) # => "/"

@see Hanami::Router::UrlHelpers @since 2.0.0

Attributes

router[R]

Public Class Methods

new(router) click to toggle source

@since 2.0.0 @api private

# File lib/hanami/slice/routes_helper.rb, line 18
def initialize(router)
  @router = router
end

Public Instance Methods

path(...) click to toggle source

@see Hanami::Router::UrlHelpers#path

# File lib/hanami/slice/routes_helper.rb, line 23
def path(...)
  router.path(...)
end
url(...) click to toggle source

@see Hanami::Router::UrlHelpers#url

# File lib/hanami/slice/routes_helper.rb, line 28
def url(...)
  router.url(...)
end