Class: Avo::AssetManager

Inherits:
Object
  • Object
show all
Includes:
ActionView::Helpers::AssetTagHelper
Defined in:
lib/avo/asset_manager.rb

Defined Under Namespace

Classes: JavascriptComponent, StylesheetComponent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAssetManager

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

#javascriptsObject (readonly)

Returns the value of attribute javascripts.



6
7
8
# File 'lib/avo/asset_manager.rb', line 6

def javascripts
  @javascripts
end

#stylesheetsObject (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

#resetObject



13
14
15
16
# File 'lib/avo/asset_manager.rb', line 13

def reset
  @stylesheets = []
  @javascripts = []
end