Class: AssetsInclude::Base
- Inherits:
-
Object
- Object
- AssetsInclude::Base
- Defined in:
- lib/assets_include/base.rb
Instance Attribute Summary collapse
-
#asset_hosts ⇒ Object
Returns the value of attribute asset_hosts.
-
#binary ⇒ Object
Returns the value of attribute binary.
-
#bundled ⇒ Object
Returns the value of attribute bundled.
-
#cache_boosters ⇒ Object
Returns the value of attribute cache_boosters.
-
#config ⇒ Object
Returns the value of attribute config.
-
#root ⇒ Object
Returns the value of attribute root.
Instance Method Summary collapse
- #group(locator, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #inline(locator) ⇒ Object
- #list(locator) ⇒ Object
- #reset ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/assets_include/base.rb', line 9 def initialize( = {}) @cache = Cache.new @config = default_assets_location @bundled = production? @cache_boosters = true .each do |key, value| public_send("#{key}=", value) end end |
Instance Attribute Details
#asset_hosts ⇒ Object
Returns the value of attribute asset_hosts.
6 7 8 |
# File 'lib/assets_include/base.rb', line 6 def asset_hosts @asset_hosts end |
#binary ⇒ Object
Returns the value of attribute binary.
7 8 9 |
# File 'lib/assets_include/base.rb', line 7 def binary @binary end |
#bundled ⇒ Object
Returns the value of attribute bundled.
6 7 8 |
# File 'lib/assets_include/base.rb', line 6 def bundled @bundled end |
#cache_boosters ⇒ Object
Returns the value of attribute cache_boosters.
6 7 8 |
# File 'lib/assets_include/base.rb', line 6 def cache_boosters @cache_boosters end |
#config ⇒ Object
Returns the value of attribute config.
6 7 8 |
# File 'lib/assets_include/base.rb', line 6 def config @config end |
#root ⇒ Object
Returns the value of attribute root.
6 7 8 |
# File 'lib/assets_include/base.rb', line 6 def root @root end |
Instance Method Details
#group(locator, options = {}) ⇒ Object
20 21 22 |
# File 'lib/assets_include/base.rb', line 20 def group(locator, = {}) assets(locator, ) end |
#inline(locator) ⇒ Object
28 29 30 |
# File 'lib/assets_include/base.rb', line 28 def inline(locator) assets(locator, inline: true) end |
#list(locator) ⇒ Object
24 25 26 |
# File 'lib/assets_include/base.rb', line 24 def list(locator) assets(locator, list: true).strip.split(',') end |
#reset ⇒ Object
32 33 34 |
# File 'lib/assets_include/base.rb', line 32 def reset cache.empty end |