Class: Avo::AssetManager
- Inherits:
-
Object
- Object
- Avo::AssetManager
- Includes:
- ActionView::Helpers::AssetTagHelper
- Defined in:
- lib/avo/asset_manager.rb
Defined Under Namespace
Classes: JavascriptComponent, StylesheetComponent
Instance Attribute Summary collapse
-
#javascripts ⇒ Object
readonly
Returns the value of attribute javascripts.
-
#stylesheets ⇒ Object
readonly
Returns the value of attribute stylesheets.
Instance Method Summary collapse
- #add_javascript(path) ⇒ Object
- #add_stylesheet(path) ⇒ Object
-
#initialize ⇒ AssetManager
constructor
A new instance of AssetManager.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ AssetManager
Returns a new instance of AssetManager.
8 9 10 11 |
# File 'lib/avo/asset_manager.rb', line 8 def initialize @stylesheets = [] @javascripts = [] end |
Instance Attribute Details
#javascripts ⇒ Object (readonly)
Returns the value of attribute javascripts.
6 7 8 |
# File 'lib/avo/asset_manager.rb', line 6 def javascripts @javascripts end |
#stylesheets ⇒ Object (readonly)
Returns the value of attribute stylesheets.
5 6 7 |
# File 'lib/avo/asset_manager.rb', line 5 def stylesheets @stylesheets end |
Instance Method Details
#add_javascript(path) ⇒ Object
22 23 24 |
# File 'lib/avo/asset_manager.rb', line 22 def add_javascript(path) @javascripts.push path end |
#add_stylesheet(path) ⇒ Object
18 19 20 |
# File 'lib/avo/asset_manager.rb', line 18 def add_stylesheet(path) @stylesheets.push path end |
#reset ⇒ Object
13 14 15 16 |
# File 'lib/avo/asset_manager.rb', line 13 def reset @stylesheets = [] @javascripts = [] end |