class TinyMCE::Rails::YamlManifest
Public Class Methods
new(file)
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 43 def initialize(file) @file = file @manifest = YAML.load_file(file) end
try(manifest_path)
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 38 def self.try(manifest_path) yaml_file = File.join(manifest_path, "manifest.yml") new(yaml_file) if File.exists?(yaml_file) end
Public Instance Methods
append(logical_path, file)
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 48 def append(logical_path, file) assets[logical_path] = logical_path end
assets()
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 64 def assets @manifest end
dump(io=nil)
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 68 def dump(io=nil) YAML.dump(@manifest, io) end
remove(logical_path)
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 52 def remove(logical_path) assets.delete(logical_path) end
remove_digest(logical_path) { |digested, logical_path| ... }
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 56 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
write()
click to toggle source
# File lib/tinymce/rails/asset_manifest.rb, line 72 def write File.open(@file, "wb") { |f| dump(f) } end