Class: RailsExternalAssetPipeline::Manifest
- Inherits:
-
Object
- Object
- RailsExternalAssetPipeline::Manifest
- Defined in:
- lib/rails_external_asset_pipeline/manifest.rb
Instance Method Summary collapse
- #fetch(asset_name) ⇒ Object
-
#initialize(manifests_path, type) ⇒ Manifest
constructor
A new instance of Manifest.
Constructor Details
#initialize(manifests_path, type) ⇒ Manifest
Returns a new instance of Manifest.
3 4 5 6 |
# File 'lib/rails_external_asset_pipeline/manifest.rb', line 3 def initialize(manifests_path, type) @manifests_path = manifests_path @type = type end |
Instance Method Details
#fetch(asset_name) ⇒ Object
8 9 10 11 12 |
# File 'lib/rails_external_asset_pipeline/manifest.rb', line 8 def fetch(asset_name) parsed_manifest.fetch(asset_name) rescue KeyError raise "The asset '#{asset_name}' of type '#{@type}' was not in the manifest" end |