Class: Assets::Environment::Dynamic
- Inherits:
-
Assets::Environment
- Object
- Assets::Environment
- Assets::Environment::Dynamic
- Includes:
- Adamantium
- Defined in:
- lib/assets/environment/dynamic.rb
Overview
Environment with dynamic asset compilation
Instance Method Summary collapse
-
#get(name) ⇒ Asset?
private
Return asset for name.
-
#index ⇒ Hash
private
Return index.
-
#rule(name) ⇒ Rule?
private
Return rule for name.
Methods inherited from Assets::Environment
Instance Method Details
#get(name) ⇒ Asset?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return asset for name
49 50 51 52 |
# File 'lib/assets/environment/dynamic.rb', line 49 def get(name) rule = rule(name) rule && rule.asset end |
#index ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return index
14 15 16 17 18 |
# File 'lib/assets/environment/dynamic.rb', line 14 def index rules.each_with_object({}) do |rule, index| index[rule.name] = rule end end |
#rule(name) ⇒ Rule?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return rule for name
33 34 35 |
# File 'lib/assets/environment/dynamic.rb', line 33 def rule(name) index[name] end |