Class: Hanami::Middleware::Assets
- Inherits:
-
Rack::Static
- Object
- Rack::Static
- Hanami::Middleware::Assets
- Defined in:
- lib/hanami/middleware/assets.rb
Overview
Instance Method Summary collapse
-
#initialize(app, options = {}, config: Hanami.app.config) ⇒ Assets
constructor
A new instance of Assets.
Constructor Details
#initialize(app, options = {}, config: Hanami.app.config) ⇒ Assets
Returns a new instance of Assets.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/hanami/middleware/assets.rb', line 8 def initialize(app, = {}, config: Hanami.app.config) root = config.actions.public_directory urls = [config.assets.path_prefix] defaults = { root: root, urls: urls } super(app, defaults.merge()) end |