Class: Avo::AssetManager
- Inherits:
-
Object
show all
- Includes:
- ActionView::Helpers::AssetTagHelper
- Defined in:
- lib/avo/asset_manager.rb
Defined Under Namespace
Classes: JavascriptComponent, StylesheetComponent
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AssetManager.
5
6
7
8
|
# File 'lib/avo/asset_manager.rb', line 5
def initialize
@stylesheets = []
@javascripts = []
end
|
Instance Method Details
#add_javascript(path) ⇒ Object
19
20
21
|
# File 'lib/avo/asset_manager.rb', line 19
def add_javascript(path)
@javascripts.push path
end
|
#add_stylesheet(path) ⇒ Object
15
16
17
|
# File 'lib/avo/asset_manager.rb', line 15
def add_stylesheet(path)
@stylesheets.push path
end
|
#javascripts ⇒ Object
27
28
29
|
# File 'lib/avo/asset_manager.rb', line 27
def javascripts
@javascripts.uniq
end
|
#reset ⇒ Object
10
11
12
13
|
# File 'lib/avo/asset_manager.rb', line 10
def reset
@stylesheets = []
@javascripts = []
end
|
#stylesheets ⇒ Object
23
24
25
|
# File 'lib/avo/asset_manager.rb', line 23
def stylesheets
@stylesheets.uniq
end
|