Class: Bankrupt::Util
- Inherits:
-
Object
- Object
- Bankrupt::Util
- Defined in:
- lib/bankrupt/util.rb
Overview
Utilities for working with asset manifest files.
Class Method Summary collapse
-
.parse_manifest(path) ⇒ Hash
Parse the asset manifest.
Class Method Details
.parse_manifest(path) ⇒ Hash
Parse the asset manifest
24 25 26 27 28 29 30 |
# File 'lib/bankrupt/util.rb', line 24 def self.parse_manifest(path) JSON.parse(File.read(path)).map do |k, v| [k.freeze, v.map { |l, b| [l.to_sym, b.freeze] }.to_h.freeze] end.to_h.freeze rescue StandardError {} end |