Class: Condenser::Rails::HelperAssetResolvers::Manifest

Inherits:
Object
  • Object
show all
Defined in:
lib/condenser/rails/helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(view) ⇒ Manifest

Returns a new instance of Manifest.

Raises:

  • (ArgumentError)


172
173
174
175
# File 'lib/condenser/rails/helper.rb', line 172

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



177
178
179
# File 'lib/condenser/rails/helper.rb', line 177

def asset_path(path)
  @manifest[path]['path']
end

#integrity(path) ⇒ Object



181
182
183
# File 'lib/condenser/rails/helper.rb', line 181

def integrity(path)
  @manifest[path]['integrity']
end