Module: LuxAssets::Manifest
Overview
manifest file
Constant Summary collapse
- MANIFEST =
Pathname.new('./public/manifest.json')
Instance Method Summary collapse
Instance Method Details
#add(name, path) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lux_assets/manifest.rb', line 8 def add name, path json = JSON.load MANIFEST.read return false if json['files'][name] == path json['files'][name] = path MANIFEST.write JSON.pretty_generate(json) true end |
#get(name) ⇒ Object
20 21 22 23 |
# File 'lib/lux_assets/manifest.rb', line 20 def get name json = JSON.load MANIFEST.read json['files'][name] end |