Class: AssetPipelineProvider
- Inherits:
-
Object
- Object
- AssetPipelineProvider
- Includes:
- Roadie::AssetProvider
- Defined in:
- lib/middleman-roadie/asset_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.
5 6 7 8 9 |
# File 'lib/middleman-roadie/asset_provider.rb', line 5 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.
3 4 5 |
# File 'lib/middleman-roadie/asset_provider.rb', line 3 def pipeline @pipeline end |
Instance Method Details
#find_stylesheet(name) ⇒ Object
11 12 13 14 15 |
# File 'lib/middleman-roadie/asset_provider.rb', line 11 def find_stylesheet(name) if (asset = find_asset_in_pipeline(name)) Stylesheet.new("#{asset.pathname} (live compiled)", asset.to_s) end end |