Class: Roadie::Rails::AssetPipelineProvider
- Inherits:
-
Object
- Object
- Roadie::Rails::AssetPipelineProvider
- Includes:
- AssetProvider
- Defined in:
- lib/roadie/rails/asset_pipeline_provider.rb
Instance Attribute Summary collapse
-
#pipeline ⇒ Object
readonly
Returns the value of attribute pipeline.
Instance Method Summary collapse
- #find_stylesheet(name) ⇒ Object
-
#initialize(pipeline) ⇒ AssetPipelineProvider
constructor
A new instance of AssetPipelineProvider.
Constructor Details
#initialize(pipeline) ⇒ AssetPipelineProvider
Returns a new instance of AssetPipelineProvider.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/roadie/rails/asset_pipeline_provider.rb', line 9 def initialize(pipeline) unless pipeline raise( ArgumentError, "You need to pass a pipeline to initialize AssetPipelineProvider" ) end super() @pipeline = pipeline end |
Instance Attribute Details
#pipeline ⇒ Object (readonly)
Returns the value of attribute pipeline.
7 8 9 |
# File 'lib/roadie/rails/asset_pipeline_provider.rb', line 7 def pipeline @pipeline end |
Instance Method Details
#find_stylesheet(name) ⇒ Object
21 22 23 24 25 |
# File 'lib/roadie/rails/asset_pipeline_provider.rb', line 21 def find_stylesheet(name) if (asset = find_asset_in_pipeline(name)) Stylesheet.new("#{filename(asset)} (live compiled)", asset.to_s) end end |