### Home Classes Methods

### In Files

- lib/compass/installers/manifest.rb

### Parent

Object

### Namespace

- CLASS Compass::Installers::Manifest::Entry

### Methods

- ::known_extensions
- ::new
- ::plural_types
- ::type
- #compile?
- #description
- #discover
- #each
- #generate_config?
- #help
- #instance_binding
- #no_configuration_file!
- #parse
- #skip_compilation!
- #welcome_message
- #with_manifest

### Included Modules

- Enumerable

### Class/Module Index

Quicksearch

- Compass
- Compass::Actions
- Compass::AppIntegration
- Compass::AppIntegration::Helpers
- Compass::AppIntegration::Rails
- Compass::AppIntegration::StandAlone
- Compass::AppIntegration::StandAlone::ConfigurationDefaults
- Compass::AppIntegration::StandAlone::Installer
- Compass::BrowserSupport
- Compass::Commands
- Compass::Commands::Base
- Compass::Commands::CleanProject
- Compass::Commands::CleanProjectOptionsParser
- Compass::Commands::CompileProjectOptionsParser
- Compass::Commands::ConfigurationOptionsParser
- Compass::Commands::CreateProject
- Compass::Commands::CreateProjectOptionsParser
- Compass::Commands::Default
- Compass::Commands::DefaultOptionsParser
- Compass::Commands::ExtensionCommand
- Compass::Commands::ExtensionOptionsParser
- Compass::Commands::ExtensionsOptionParser
- Compass::Commands::GenerateGridBackground
- Compass::Commands::GridBackgroundOptionsParser
- Compass::Commands::Help
- Compass::Commands::HelpOptionsParser
- Compass::Commands::Imports
- Compass::Commands::InstallerCommand
- Compass::Commands::Interactive
- Compass::Commands::InteractiveOptionsParser
- Compass::Commands::ListFrameworks
- Compass::Commands::MemoryDebugger
- Compass::Commands::PrintVersion
- Compass::Commands::ProjectBase
- Compass::Commands::ProjectStats
- Compass::Commands::Registry
- Compass::Commands::Sprite
- Compass::Commands::SpriteOptionsParser
- Compass::Commands::StampPattern
- Compass::Commands::StampPatternOptionsParser
- Compass::Commands::StatsOptionsParser
- Compass::Commands::StructureOptionsParser
- Compass::Commands::UnpackExtension
- Compass::Commands::UpdateProject
- Compass::Commands::ValidateProject
- Compass::Commands::ValidationOptionsParser
- Compass::Commands::VersionOptionsParser
- Compass::Commands::WatchProject
- Compass::Commands::WatchProjectOptionsParser
- Compass::Commands::WriteConfiguration
- Compass::Compiler
- Compass::Configuration
- Compass::Configuration::Adapters
- Compass::Configuration::Comments
- Compass::Configuration::Data
- Compass::Configuration::Defaults
- Compass::Configuration::FileData
- Compass::Configuration::Helpers
- Compass::Configuration::Inheritance
- Compass::Configuration::Inheritance::ClassMethods
- Compass::Configuration::Inheritance::ClassMethods::ArrayProxy
- Compass::Configuration::Inheritance::InstanceMethods
- Compass::Configuration::Paths
- Compass::Configuration::Serialization
- Compass::Error
- Compass::Exec
- Compass::Exec::CommandOptionParser
- Compass::Exec::GlobalOptionsParser
- Compass::Exec::Helpers
- Compass::Exec::ProjectOptionsParser
- Compass::Exec::SubCommandUI
- Compass::Exec::SwitchUI
- Compass::FilesystemConflict
- Compass::Frameworks
- Compass::Frameworks::Framework
- Compass::GridBuilder
- Compass::Installers
- Compass::Installers::BareInstaller
- Compass::Installers::Base
- Compass::Installers::Manifest
- Compass::Installers::Manifest::Entry
- Compass::Installers::ManifestInstaller
- Compass::Installers::TemplateContext
- Compass::Logger
- Compass::MissingDependency
- Compass::NullLogger
- Compass::PNG
- Compass::SassExtensions
- Compass::SassExtensions::Functions
- Compass::SassExtensions::Functions::Colors
- Compass::SassExtensions::Functions::Constants
- Compass::SassExtensions::Functions::CrossBrowserSupport
- Compass::SassExtensions::Functions::CrossBrowserSupport::CSS2FallbackValue
- Compass::SassExtensions::Functions::Display
- Compass::SassExtensions::Functions::Enumerate
- Compass::SassExtensions::Functions::Env
- Compass::SassExtensions::Functions::FontFiles
- Compass::SassExtensions::Functions::GradientSupport
- Compass::SassExtensions::Functions::GradientSupport::Assertions
- Compass::SassExtensions::Functions::GradientSupport::ColorStop
- Compass::SassExtensions::Functions::GradientSupport::Functions
- Compass::SassExtensions::Functions::GradientSupport::Gradient
- Compass::SassExtensions::Functions::GradientSupport::Gradient::ClassMethods
- Compass::SassExtensions::Functions::GradientSupport::LinearGradient
- Compass::SassExtensions::Functions::GradientSupport::RadialGradient
- Compass::SassExtensions::Functions::ImageSize
- Compass::SassExtensions::Functions::ImageSize::ImageProperties
- Compass::SassExtensions::Functions::ImageSize::JPEG
- Compass::SassExtensions::Functions::InlineImage
- Compass::SassExtensions::Functions::Lists
- Compass::SassExtensions::Functions::Math
- Compass::SassExtensions::Functions::Selectors
- Compass::SassExtensions::Functions::Sprites
- Compass::SassExtensions::Functions::Sprites::VariableReader
- Compass::SassExtensions::Functions::Urls
- Compass::SassExtensions::Functions::Urls::FontUrl
- Compass::SassExtensions::Functions::Urls::GeneratedImageUrl
- Compass::SassExtensions::Functions::Urls::ImageUrl
- Compass::SassExtensions::Functions::Urls::StylesheetUrl
- Compass::SassExtensions::Sprites
- Compass::SassExtensions::Sprites::ChunkyPngEngine
- Compass::SassExtensions::Sprites::Engine
- Compass::SassExtensions::Sprites::Image
- Compass::SassExtensions::Sprites::ImageMethods
- Compass::SassExtensions::Sprites::ImageRow
- Compass::SassExtensions::Sprites::LayoutMethods
- Compass::SassExtensions::Sprites::RowFitter
- Compass::SassExtensions::Sprites::SpriteMap
- Compass::SassExtensions::Sprites::SpriteMethods
- Compass::SpriteException
- Compass::SpriteImporter
- Compass::Sprites
- Compass::Sprites::Binding
- Compass::Stats
- Compass::Stats::CssFile
- Compass::Stats::SassFile
- Compass::Stats::StatsVisitor
- Compass::TestCase
- Compass::Util
- Compass::Version
- Sass
- Sass::Script
- Sass::Script::CrossBrowserFunctionCall
- Sass::Script::Funcall
- Sass::Script::Functions
- Sass::Script::Functions::EvaluationContext
- Sass::Script::HasSimpleCrossBrowserFunctionSupport
- Sass::Script::List
- Sass::Tree
- Sass::Tree::Node
- QuickCache

No matching classes.

# Compass::Installers::Manifest

### Attributes

options[R]
welcome_message_options[R]

### Public Class Methods

known_extensions() click to toggle source

    # File lib/compass/installers/manifest.rb, line 23
    def self.known_extensions
      @known_extensions ||= {}
    end

new(manifest_file = nil, options = {}) click to toggle source

    # File lib/compass/installers/manifest.rb, line 15
    def initialize(manifest_file = nil, options = {})
      @entries = []
      @options = options
      @generate_config = true
      @compile_after_generation = true
      parse(manifest_file) if manifest_file
    end

plural_types() click to toggle source

    # File lib/compass/installers/manifest.rb, line 27
    def self.plural_types
      @plural_types ||= {}
    end

type(t, options = {}) click to toggle source

    # File lib/compass/installers/manifest.rb, line 31
    def self.type(t, options = {})
      Array(options[:extensions]).each do |ext|
        self.known_extensions[ext] = t
      end
      self.plural_types[options[:plural]] = t if options[:plural]
      eval           def #{t}(from, options = {})             @entries << Entry.new(:#{t}, from, options)          end          def has_#{t}?            @entries.detect {|e| e.type == :#{t}}          end          def each_#{t}            @entries.select {|e| e.type == :#{t}}.each {|e| yield e}          end
    end

### Public Instance Methods

compile?() click to toggle source

    # File lib/compass/installers/manifest.rb, line 119
    def compile?
      @compile_after_generation
    end

description(value = nil) click to toggle source

    # File lib/compass/installers/manifest.rb, line 102
    def description(value = nil)
      if value
        @description = value
      else
        @description
      end
    end

discover(type) click to toggle source

    # File lib/compass/installers/manifest.rb, line 57
    def discover(type)
      type = self.class.plural_types[type] || type
      dir = File.dirname(@manifest_file)
      Dir.glob("#{dir}/**/*").each do |file|
        next if /manifest\.rb/ =~ file
        short_name = file[(dir.length+1)..-1]
        options = {}
        ext = if File.extname(short_name) == ".erb"
          options[:erb] = true
          File.extname(short_name[0..-5])
        else
          File.extname(short_name)
        end[1..-1]
        file_type = self.class.known_extensions[ext]
        file_type = :file if file_type.nil?
        file_type = :directory if File.directory?(file)
        if type == :all || type == file_type
          send(file_type, short_name, options)
        end
      end
    end

each() click to toggle source

Enumerates over the manifest files

    # File lib/compass/installers/manifest.rb, line 111
    def each
      @entries.each {|e| yield e}
    end

generate_config?() click to toggle source

    # File lib/compass/installers/manifest.rb, line 115
    def generate_config?
      @generate_config
    end

help(value = nil) click to toggle source

    # File lib/compass/installers/manifest.rb, line 79
    def help(value = nil)
      if value
        @help = value
      else
        @help
      end
    end

welcome_message(value = nil, options = {}) click to toggle source

    # File lib/compass/installers/manifest.rb, line 89
    def welcome_message(value = nil, options = {})
      if value
        @welcome_message = value
        @welcome_message_options = options
      else
        @welcome_message
      end
    end

### Protected Instance Methods

instance_binding() click to toggle source

    # File lib/compass/installers/manifest.rb, line 155
    def instance_binding
      binding
    end

no_configuration_file!() click to toggle source

    # File lib/compass/installers/manifest.rb, line 125
    def no_configuration_file!
      @generate_config = false
    end

parse(manifest_file) click to toggle source

parses a manifest file which is a ruby script evaluated in a Manifest instance context

    # File lib/compass/installers/manifest.rb, line 142
    def parse(manifest_file)
      with_manifest(manifest_file) do
        if File.exists?(manifest_file)
          open(manifest_file) do |f|
            eval(f.read, instance_binding, manifest_file)
          end
        else
            eval("discover :all", instance_binding, manifest_file)
        end
      end
    end

skip_compilation!() click to toggle source

    # File lib/compass/installers/manifest.rb, line 129
    def skip_compilation!
      @compile_after_generation = false
    end

with_manifest(manifest_file) click to toggle source

    # File lib/compass/installers/manifest.rb, line 133
    def with_manifest(manifest_file)
      @manifest_file = manifest_file
      yield
    ensure
      @manifest_file = nil
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.