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.
7 8 9 10 11 |
# File 'lib/roadie/rails/asset_pipeline_provider.rb', line 7 def initialize(pipeline) raise ArgumentError, "You need to pass a pipeline to initialize AssetPipelineProvider" unless pipeline super() @pipeline = pipeline end |
Instance Attribute Details
#pipeline ⇒ Object (readonly)
Returns the value of attribute pipeline.
5 6 7 |
# File 'lib/roadie/rails/asset_pipeline_provider.rb', line 5 def pipeline @pipeline end |
Instance Method Details
#find_stylesheet(name) ⇒ Object
13 14 15 16 17 |
# File 'lib/roadie/rails/asset_pipeline_provider.rb', line 13 def find_stylesheet(name) if (asset = find_asset_in_pipeline(name)) Stylesheet.new("#{filename(asset)} (live compiled)", asset.to_s) end end |