Class: Hanami::Providers::Assets Private
- Inherits:
-
Hanami::Provider::Source
- Object
- Dry::System::Provider::Source
- Hanami::Provider::Source
- Hanami::Providers::Assets
- Defined in:
- lib/hanami/providers/assets.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/assets.rb', line 14 def prepare require "hanami/assets" 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 |
# File 'lib/hanami/providers/assets.rb', line 19 def start root = slice.app.root.join("public", "assets", Hanami::Assets.public_assets_dir(target).to_s) assets = Hanami::Assets.new(config: slice.config.assets, root: root) register(:assets, assets) end |