Class: Sprockets::Rails::HelperAssetResolvers::Manifest
- Inherits:
-
Object
- Object
- Sprockets::Rails::HelperAssetResolvers::Manifest
- Defined in:
- lib/sprockets/rails/helper.rb
Overview
:nodoc:
Instance Method Summary collapse
- #asset_path(path, digest, allow_non_precompiled = false) ⇒ Object
- #digest_path(path, allow_non_precompiled = false) ⇒ Object
- #find_debug_asset(path) ⇒ Object
-
#initialize(view) ⇒ Manifest
constructor
A new instance of Manifest.
- #integrity(path) ⇒ Object
Constructor Details
#initialize(view) ⇒ Manifest
Returns a new instance of Manifest.
281 282 283 284 |
# File 'lib/sprockets/rails/helper.rb', line 281 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, digest, allow_non_precompiled = false) ⇒ Object
286 287 288 289 290 |
# File 'lib/sprockets/rails/helper.rb', line 286 def asset_path(path, digest, allow_non_precompiled = false) if digest digest_path path, allow_non_precompiled end end |
#digest_path(path, allow_non_precompiled = false) ⇒ Object
292 293 294 |
# File 'lib/sprockets/rails/helper.rb', line 292 def digest_path(path, allow_non_precompiled = false) @manifest.assets[path] end |
#find_debug_asset(path) ⇒ Object
302 303 304 |
# File 'lib/sprockets/rails/helper.rb', line 302 def find_debug_asset(path) nil end |
#integrity(path) ⇒ Object
296 297 298 299 300 |
# File 'lib/sprockets/rails/helper.rb', line 296 def integrity(path) if = (path) ["integrity"] end end |