Class: Condenser::Rails::HelperAssetResolvers::Manifest
- Inherits:
-
Object
- Object
- Condenser::Rails::HelperAssetResolvers::Manifest
- Defined in:
- lib/condenser/rails/helper.rb
Overview
:nodoc:
Instance Method Summary collapse
- #asset_path(path) ⇒ Object
-
#initialize(view) ⇒ Manifest
constructor
A new instance of Manifest.
- #integrity(path) ⇒ Object
- #type(path) ⇒ Object
Constructor Details
#initialize(view) ⇒ Manifest
Returns a new instance of Manifest.
214 215 216 217 |
# File 'lib/condenser/rails/helper.rb', line 214 def initialize(view) @manifest = view.assets_manifest raise ArgumentError, 'config.assets.resolve_with includes :manifest, but app.assets_manifest is nil' unless @manifest end |
Instance Method Details
#asset_path(path) ⇒ Object
219 220 221 |
# File 'lib/condenser/rails/helper.rb', line 219 def asset_path(path) @manifest[path][:path] end |
#integrity(path) ⇒ Object
223 224 225 |
# File 'lib/condenser/rails/helper.rb', line 223 def integrity(path) @manifest[path]&.[](:integrity) end |
#type(path) ⇒ Object
227 228 229 |
# File 'lib/condenser/rails/helper.rb', line 227 def type(path) @manifest[path]&.[](:type) end |