Class: JsAssets::List
- Inherits:
-
Object
- Object
- JsAssets::List
- Defined in:
- lib/js_assets/list.rb
Class Attribute Summary collapse
-
.allow ⇒ Object
Returns the value of attribute allow.
-
.exclude ⇒ Object
Returns the value of attribute exclude.
Class Method Summary collapse
Class Attribute Details
.allow ⇒ Object
Returns the value of attribute allow.
4 5 6 |
# File 'lib/js_assets/list.rb', line 4 def allow @allow end |
.exclude ⇒ Object
Returns the value of attribute exclude.
4 5 6 |
# File 'lib/js_assets/list.rb', line 4 def exclude @exclude end |
Class Method Details
.fetch ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/js_assets/list.rb', line 8 def self.fetch project_assets = {} ::Rails.application.assets.logical_paths do |logical_path, filename| next if matches_filter(@exclude, logical_path, filename) next unless matches_filter(@allow, logical_path, filename) if ::Rails.application.assets.file_digest(filename) project_assets[logical_path] = File.join('/', ::Rails.application.config.assets.prefix, ::Rails.application.assets[logical_path].digest_path) else project_assets[logical_path] = File.join('/', ::Rails.application.config.assets.prefix, logical_path) end end return project_assets end |