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 {|_self| ... } ⇒ Base
constructor
A new instance of Base.
- #inline(locator) ⇒ Object
- #list(locator) ⇒ Object
- #reset ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 16 |
# File 'lib/assets_include/base.rb', line 9 def initialize(&block) @cache = Cache.new @config = default_assets_location @bundled = production? @cache_boosters = true yield(self) if block_given? 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
18 19 20 |
# File 'lib/assets_include/base.rb', line 18 def group(locator, = {}) assets(locator, ) end |
#inline(locator) ⇒ Object
26 27 28 |
# File 'lib/assets_include/base.rb', line 26 def inline(locator) assets(locator, inline: true) end |
#list(locator) ⇒ Object
22 23 24 |
# File 'lib/assets_include/base.rb', line 22 def list(locator) assets(locator, list: true).strip.split(',') end |
#reset ⇒ Object
30 31 32 |
# File 'lib/assets_include/base.rb', line 30 def reset cache.empty end |