Class: Rake::AssetTasks::Asset
- Inherits:
-
Object
- Object
- Rake::AssetTasks::Asset
- Defined in:
- lib/rake/asset_tasks/asset.rb
Overview
Asset class for sprockets pre-compilation
Instance Method Summary collapse
-
#initialize(env, file) ⇒ Asset
constructor
Returns a sprockets asset.
-
#path ⇒ String
Returns the path of an asset.
Constructor Details
#initialize(env, file) ⇒ Asset
Returns a sprockets asset
9 10 11 12 |
# File 'lib/rake/asset_tasks/asset.rb', line 9 def initialize(env, file) @env = env @file = file end |
Instance Method Details
#path ⇒ String
Returns the path of an asset
16 17 18 |
# File 'lib/rake/asset_tasks/asset.rb', line 16 def path File.(file).sub(/(#{@env.paths.join('|')})\//, '') end |