Class: Sprockets::Helpers::AssetPath
- Defined in:
- lib/sprockets/helpers/asset_path.rb
Overview
‘AssetPath` generates a full path for an asset that exists in Sprockets environment.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BasePath
Instance Method Summary collapse
-
#initialize(uri, asset, options = {}) ⇒ AssetPath
constructor
A new instance of AssetPath.
- #to_a ⇒ Object
Methods inherited from BasePath
Constructor Details
#initialize(uri, asset, options = {}) ⇒ AssetPath
Returns a new instance of AssetPath.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/sprockets/helpers/asset_path.rb', line 6 def initialize(uri, asset, = {}) @uri = uri @asset = asset @options = { :body => false, :digest => Helpers.digest, :prefix => Helpers.prefix }.merge @uri.path = @options[:digest] ? asset.digest_path : asset.logical_path end |