Sha256: 4937b1e8d04b36da1b28965f6732d05180f41529c9305386b2db2940b7317582
Contents?: true
Size: 767 Bytes
Versions: 22
Compression:
Stored size: 767 Bytes
Contents
# frozen_string_literal: true module Hanami class Slice # 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 class RoutesHelper # @since 2.0.0 # @api private def initialize(router) @router = router end # @see Hanami::Router::UrlHelpers#path def path(...) router.path(...) end # @see Hanami::Router::UrlHelpers#url def url(...) router.url(...) end private attr_reader :router end end end
Version data entries
22 entries across 22 versions & 1 rubygems