Class: Hanami::Providers::Routes Private
- Inherits:
-
Hanami::Provider::Source
- Object
- Dry::System::Provider::Source
- Hanami::Provider::Source
- Hanami::Providers::Routes
- Defined in:
- lib/hanami/providers/routes.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Provider source to register routes helper component in Hanami slices.
Instance Attribute Summary
Attributes inherited from Hanami::Provider::Source
Instance Method Summary collapse
- #prepare ⇒ Object private
- #start ⇒ Object private
Methods inherited from Hanami::Provider::Source
#initialize, #target_container
Constructor Details
This class inherits a constructor from Hanami::Provider::Source
Instance Method Details
#prepare ⇒ Object
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.
14 15 16 |
# File 'lib/hanami/providers/routes.rb', line 14 def prepare require "hanami/slice/routes_helper" end |
#start ⇒ Object
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.
19 20 21 22 23 24 25 26 |
# File 'lib/hanami/providers/routes.rb', line 19 def start # Register a lazy instance of RoutesHelper to ensure we don't load prematurely load the # router during the process of booting. This ensures the router's resolver can run strict # action key checks once when it runs on a fully booted slice. register :routes do Hanami::Slice::RoutesHelper.new(slice.router) end end |