Sha256: 261f26997522c7511436b87b46218c73afbbc54af5a2f379f0c243dd83f21699
Contents?: true
Size: 922 Bytes
Versions: 9
Compression:
Stored size: 922 Bytes
Contents
module TinyMCE module Rails class YamlManifest < AssetManifest def self.try(manifest_path) yaml_file = File.join(manifest_path, "manifest.yml") new(yaml_file) if File.exist?(yaml_file) end def initialize(file) @file = file @manifest = YAML.load_file(file) end def append(logical_path, file) assets[logical_path] = logical_path end def remove(logical_path) assets.delete(logical_path) end def remove_digest(logical_path) asset_path(logical_path) do |digested, logical_path| assets[logical_path] = logical_path yield digested, logical_path if block_given? end end def assets @manifest end def dump(io=nil) YAML.dump(@manifest, io) end def write File.open(@file, "wb") { |f| dump(f) } end end end end
Version data entries
9 entries across 9 versions & 2 rubygems