Module: Dust::Utils
- Defined in:
- lib/dust/utils.rb
Instance Method Summary collapse
Instance Method Details
#select_assets(path, relative_path) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/dust/utils.rb', line 3 def select_assets(path, relative_path) folder = File.join(path, '**') relative_folder = Dust.root.join(relative_path) Dir[Dust.root.join(folder, '*.{js,css}')].inject([]) do |list, file| list << Pathname.new(file).relative_path_from(relative_folder).to_s list end end |