class TinyMCE::Rails::YamlManifest

def self.try(manifest_path)

def self.try(manifest_path)
  yaml_file = File.join(manifest_path, "manifest.yml")
  new(yaml_file) if File.exist?(yaml_file)
end

def append(logical_path, file)

def append(logical_path, file)
  assets[logical_path] = logical_path
end

def assets

def assets
  @manifest
end

def dump(io=nil)

def dump(io=nil)
  YAML.dump(@manifest, io)
end

def initialize(file)

def initialize(file)
  @file = file
  @manifest = YAML.load_file(file)
end

def remove(logical_path)

def remove(logical_path)
  assets.delete(logical_path)
end

def remove_digest(logical_path)

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 write

def write
  File.open(@file, "wb") { |f| dump(f) }
end