Class: CabezaDeTermo::Assets::RenderingScopeAssetsCollector
- Inherits:
-
Object
- Object
- CabezaDeTermo::Assets::RenderingScopeAssetsCollector
- Defined in:
- lib/cabeza-de-termo/assets/collectors/rendering-scope-assets-collector.rb
Overview
Collects assets from a rendering scope.
Instance Method Summary collapse
-
#collect_javascripts_from(rendering_scope) ⇒ Object
Collect the javascripts from the layout and view on the rendering_scope.
-
#collect_stylesheets_from(rendering_scope) ⇒ Object
Collect the stylesheets from the layout and view on the rendering_scope.
-
#collected_assets ⇒ Object
Answer the collection of assets collected into the Collector.
-
#initialize ⇒ RenderingScopeAssetsCollector
constructor
Initialize the instance.
Constructor Details
#initialize ⇒ RenderingScopeAssetsCollector
Initialize the instance
8 9 10 |
# File 'lib/cabeza-de-termo/assets/collectors/rendering-scope-assets-collector.rb', line 8 def initialize @assets_collector = new_assets_collector end |
Instance Method Details
#collect_javascripts_from(rendering_scope) ⇒ Object
Collect the javascripts from the layout and view on the rendering_scope.
24 25 26 27 |
# File 'lib/cabeza-de-termo/assets/collectors/rendering-scope-assets-collector.rb', line 24 def collect_javascripts_from(rendering_scope) rendering_scope.collect_javascripts_with assets_collector collected_assets end |
#collect_stylesheets_from(rendering_scope) ⇒ Object
Collect the stylesheets from the layout and view on the rendering_scope.
18 19 20 21 |
# File 'lib/cabeza-de-termo/assets/collectors/rendering-scope-assets-collector.rb', line 18 def collect_stylesheets_from(rendering_scope) rendering_scope.collect_stylesheets_with assets_collector collected_assets end |
#collected_assets ⇒ Object
Answer the collection of assets collected into the Collector.
13 14 15 |
# File 'lib/cabeza-de-termo/assets/collectors/rendering-scope-assets-collector.rb', line 13 def collected_assets @assets_collector.assets end |