### Home Classes Methods

### In Files

- lib/tinymce/rails/asset_manifest.rb

### Parent

Object

### Methods

- ::new
- ::try
- #append
- #dump
- #each
- #remove
- #remove_digest
- #to_s
- #write

### Class/Module Index

Quicksearch

- TinyMCE
- TinyMCE::JsonManifest
- TinyMCE::NullManifest
- TinyMCE::Rails
- TinyMCE::Rails::AssetInstaller
- TinyMCE::Rails::AssetManifest
- TinyMCE::Rails::Configuration
- TinyMCE::Rails::Configuration::Function
- TinyMCE::Rails::ConfigurationFile
- TinyMCE::Rails::Engine
- TinyMCE::Rails::Helper
- TinyMCE::Rails::MultipleConfiguration
- TinyMCE::YamlManifest

No matching classes.

# TinyMCE::YamlManifest

### Public Class Methods

new(file) click to toggle source

    # File lib/tinymce/rails/asset_manifest.rb, line 20
    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 15
    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 25
    def append(logical_path, file)
      @manifest[logical_path] = logical_path
    end

dump(io=nil) click to toggle source

    # File lib/tinymce/rails/asset_manifest.rb, line 50
    def dump(io=nil)
      YAML.dump(@manifest, io)
    end

each(pattern) click to toggle source

    # File lib/tinymce/rails/asset_manifest.rb, line 40
    def each(pattern)
      @manifest.each_key do |asset|
        yield asset if asset =~ pattern
      end
    end

remove(logical_path) click to toggle source

    # File lib/tinymce/rails/asset_manifest.rb, line 29
    def remove(logical_path)
      @manifest.delete(logical_path)
    end

remove_digest(logical_path) click to toggle source

    # File lib/tinymce/rails/asset_manifest.rb, line 33
    def remove_digest(logical_path)
      if digested = @manifest[logical_path]
        @manifest[logical_path] = logical_path
        yield digested, logical_path if block_given?
      end
    end

to_s() click to toggle source

    # File lib/tinymce/rails/asset_manifest.rb, line 46
    def to_s
      dump
    end

write() click to toggle source

    # File lib/tinymce/rails/asset_manifest.rb, line 54
    def write
      File.open(@file, "wb") { |f| dump(f) }
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.