class Bankrupt::Util
Utilities for working with asset manifest files.
Public Class Methods
parse_manifest(path)
click to toggle source
Parse the asset manifest
@param path [String] path to the manifest @return [Hash] parsed manifest or empty hash on error
# 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