Module: Compass

### Home Classes Methods

### In Files

- lib/compass/browser_support.rb
- lib/compass/configuration.rb
- lib/compass/configuration/adapters.rb
- lib/compass/configuration/data.rb
- lib/compass/configuration/defaults.rb
- lib/compass/configuration/inheritance.rb
- lib/compass/configuration/watch.rb
- lib/compass/core.rb
- lib/compass/core/generated_version.rb
- lib/compass/core/version.rb
- lib/compass/error.rb
- lib/compass/frameworks.rb

### Namespace

- MODULE Compass::BrowserSupport
- MODULE Compass::Configuration
- MODULE Compass::Core
- MODULE Compass::Frameworks
- MODULE Compass::HasDeprecatedConstantsFromCore
- MODULE Compass::SassExtensions
- MODULE Compass::Util
- CLASS Compass::Error

### Methods

- ::add_configuration
- ::configuration
- ::default_configuration
- ::deprojectize
- ::discover_extensions!
- ::discover_gem_extensions!
- ::projectize
- ::reset_configuration!
- ::shared_extension_paths

### Class/Module Index

Quicksearch

- Compass
- Compass::BrowserSupport
- Compass::Configuration
- Compass::Configuration::Adapters
- Compass::Configuration::Data
- Compass::Configuration::Defaults
- Compass::Configuration::Inheritance
- Compass::Configuration::Inheritance::ClassMethods
- Compass::Configuration::Inheritance::ClassMethods::ArrayProxy
- Compass::Configuration::Inheritance::InstanceMethods
- Compass::Configuration::Paths
- Compass::Configuration::Watch
- Compass::Core
- Compass::Core::CanIUse
- Compass::Core::SassExtensions
- Compass::Core::SassExtensions::Functions
- Compass::Core::SassExtensions::Functions::Colors
- Compass::Core::SassExtensions::Functions::Configuration
- Compass::Core::SassExtensions::Functions::Constants
- Compass::Core::SassExtensions::Functions::CrossBrowserSupport
- Compass::Core::SassExtensions::Functions::CrossBrowserSupport::CSS2FallbackValue
- Compass::Core::SassExtensions::Functions::Display
- Compass::Core::SassExtensions::Functions::Enumerate
- Compass::Core::SassExtensions::Functions::Env
- Compass::Core::SassExtensions::Functions::Files
- Compass::Core::SassExtensions::Functions::FontFiles
- Compass::Core::SassExtensions::Functions::GradientSupport
- Compass::Core::SassExtensions::Functions::GradientSupport::Assertions
- Compass::Core::SassExtensions::Functions::GradientSupport::CSS3AngleToSVGConverter
- Compass::Core::SassExtensions::Functions::GradientSupport::ColorStop
- Compass::Core::SassExtensions::Functions::GradientSupport::Functions
- Compass::Core::SassExtensions::Functions::GradientSupport::Gradient
- Compass::Core::SassExtensions::Functions::GradientSupport::Gradient::ClassMethods
- Compass::Core::SassExtensions::Functions::GradientSupport::LinearGradient
- Compass::Core::SassExtensions::Functions::GradientSupport::RadialGradient
- Compass::Core::SassExtensions::Functions::ImageSize
- Compass::Core::SassExtensions::Functions::ImageSize::ImageProperties
- Compass::Core::SassExtensions::Functions::ImageSize::JPEG
- Compass::Core::SassExtensions::Functions::InlineImage
- Compass::Core::SassExtensions::Functions::Lists
- Compass::Core::SassExtensions::Functions::Math
- Compass::Core::SassExtensions::Functions::SassDeclarationHelper
- Compass::Core::SassExtensions::Functions::Selectors
- Compass::Core::SassExtensions::Functions::Urls
- Compass::Core::SassExtensions::Functions::Urls::FontUrl
- Compass::Core::SassExtensions::Functions::Urls::GeneratedImageUrl
- Compass::Core::SassExtensions::Functions::Urls::ImageUrl
- Compass::Core::SassExtensions::Functions::Urls::StylesheetUrl
- Compass::Error
- Compass::Frameworks
- Compass::Frameworks::Framework
- Compass::HasDeprecatedConstantsFromCore
- Compass::SassExtensions
- Compass::SassExtensions::Functions
- Compass::Util
- Sass
- Sass::Script
- Sass::Script::CrossBrowserFunctionCall
- Sass::Script::Funcall
- Sass::Script::Functions
- Sass::Script::Functions::EvaluationContext
- Sass::Script::HasSimpleCrossBrowserFunctionSupport
- Sass::Script::List
- Sass::Script::Value
- Sass::Script::Value::ArgList
- Sass::Script::Value::Base
- Sass::Script::Value::List
- Sass::Script::Value::Map
- Sass::Tree
- Sass::Tree::Node

No matching classes.

# Compass

### Public Class Methods

add_configuration(data, filename = nil) click to toggle source

    # File lib/compass/configuration.rb, line 134
    def add_configuration(data, filename = nil)
      return if data.nil?

      unless data.is_a?(Compass::Configuration::Data)
        # XXX HAX Need to properly factor this apart from the main compass project
        if respond_to?(:configuration_for)
          data = configuration_for(data, filename)
        else
          raise ArgumentError, "Invalid argument: #{data.inspect}"
        end
      end

      data.inherit_from!(configuration) if configuration
      data.on_top!
      @configuration = data
    end

configuration() click to toggle source

The Compass configuration singleton.

    # File lib/compass/configuration.rb, line 122
    def configuration
      @configuration ||= default_configuration
      if block_given?
        yield @configuration
      end
      @configuration
    end

default_configuration() click to toggle source

    # File lib/compass/configuration.rb, line 130
    def default_configuration
      Compass::Configuration::Data.new('defaults').extend(Compass::Configuration::Defaults)
    end

deprojectize(path, project_path = nil) click to toggle source

    # File lib/compass/configuration.rb, line 162
    def deprojectize(path, project_path = nil)
      project_path ||= configuration.project_path
      if path[0..(project_path.size - 1)] == project_path
        path[(project_path.size + 1)..-1]
      else
        path
      end
    end

discover_extensions!() click to toggle source

    # File lib/compass/frameworks.rb, line 169
    def discover_extensions!
      Compass.shared_extension_paths.each do |extensions_path|
        if File.directory?(extensions_path)
          Compass::Frameworks.discover(extensions_path)
        end
      end
      if File.directory?(configuration.extensions_path)
        Compass::Frameworks.discover(configuration.extensions_path)
      end
      discover_gem_extensions!
    end

discover_gem_extensions!() click to toggle source

    # File lib/compass/frameworks.rb, line 157
    def discover_gem_extensions!
      if defined?(Gem)
        Gem.find_files("compass-*").map{|f| File.basename(f, ".rb")}.each do |compass_extension|
          begin
            require compass_extension
          rescue Gem::LoadError, LoadError
            Compass::Util.compass_warn "Unable to load extension: #{compass_extension}"
          end
        end
      end
    end

projectize(path, project_path = nil) click to toggle source

Returns a full path to the relative path to the project directory

    # File lib/compass/configuration.rb, line 157
    def projectize(path, project_path = nil)
      project_path ||= configuration.project_path
      File.join(project_path, *path.split('/'))
    end

reset_configuration!() click to toggle source

    # File lib/compass/configuration.rb, line 152
    def reset_configuration!
      @configuration = nil
    end

shared_extension_paths() click to toggle source

    # File lib/compass/core.rb, line 49
    def shared_extension_paths
      @shared_extension_paths ||= begin
        if ENV["HOME"] && File.directory?(ENV["HOME"])
          [File.join(ENV["HOME"], ".compass", "extensions")]
        else
          []
        end
      rescue ArgumentError # If HOME is relative
        []
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.