### Home Classes Methods

### In Files

- lib/sass/plugin/rails.rb
- lib/sass/plugin/merb.rb
- lib/sass/plugin/configuration.rb

### Methods

- #add_template_location
- #default_options
- #options
- #options=
- #remove_template_location
- #reset!
- #template_location_array

### Class/Module Index

Quicksearch

- Sass
- Sass::CSS
- Sass::CacheStores
- Sass::CacheStores::Base
- Sass::CacheStores::Chain
- Sass::CacheStores::Filesystem
- Sass::CacheStores::Memory
- Sass::CacheStores::Null
- Sass::Callbacks
- Sass::Callbacks::InstanceMethods
- Sass::Engine
- Sass::Engine::Line
- Sass::Environment
- Sass::Exec
- Sass::Exec::Generic
- Sass::Exec::Sass
- Sass::Exec::SassConvert
- Sass::Exec::Scss
- Sass::Importers
- Sass::Importers::Base
- Sass::Importers::Filesystem
- Sass::Logger
- Sass::Logger::Base
- Sass::Logger::LogLevel
- Sass::Logger::LogLevel::ClassMethods
- Sass::Media
- Sass::Media::Query
- Sass::Media::QueryList
- Sass::Plugin
- Sass::Plugin::Compiler
- Sass::Plugin::Configuration
- Sass::Plugin::MerbBootLoader
- Sass::Plugin::Rack
- Sass::Plugin::StalenessChecker
- Sass::Repl
- Sass::SCSS
- Sass::SCSS::CssParser
- Sass::SCSS::Parser
- Sass::SCSS::RX
- Sass::SCSS::ScriptLexer
- Sass::SCSS::ScriptParser
- Sass::SCSS::StaticParser
- Sass::Script
- Sass::Script::ArgList
- Sass::Script::Bool
- Sass::Script::Color
- Sass::Script::CssLexer
- Sass::Script::CssParser
- Sass::Script::Funcall
- Sass::Script::Functions
- Sass::Script::Functions::EvaluationContext
- Sass::Script::Interpolation
- Sass::Script::Lexer
- Sass::Script::List
- Sass::Script::Literal
- Sass::Script::Node
- Sass::Script::Null
- Sass::Script::Number
- Sass::Script::Operation
- Sass::Script::Parser
- Sass::Script::String
- Sass::Script::StringInterpolation
- Sass::Script::UnaryOperation
- Sass::Script::Variable
- Sass::Selector
- Sass::Selector::AbstractSequence
- Sass::Selector::Attribute
- Sass::Selector::Class
- Sass::Selector::CommaSequence
- Sass::Selector::Element
- Sass::Selector::Id
- Sass::Selector::Interpolation
- Sass::Selector::Parent
- Sass::Selector::Placeholder
- Sass::Selector::Pseudo
- Sass::Selector::SelectorPseudoClass
- Sass::Selector::Sequence
- Sass::Selector::Simple
- Sass::Selector::SimpleSequence
- Sass::Selector::Universal
- Sass::Shared
- Sass::Supports
- Sass::Supports::Condition
- Sass::Supports::Declaration
- Sass::Supports::Interpolation
- Sass::Supports::Negation
- Sass::Supports::Operator
- Sass::SyntaxError
- Sass::Tree
- Sass::Tree::CharsetNode
- Sass::Tree::CommentNode
- Sass::Tree::ContentNode
- Sass::Tree::CssImportNode
- Sass::Tree::DebugNode
- Sass::Tree::DirectiveNode
- Sass::Tree::EachNode
- Sass::Tree::ExtendNode
- Sass::Tree::ForNode
- Sass::Tree::FunctionNode
- Sass::Tree::IfNode
- Sass::Tree::ImportNode
- Sass::Tree::MediaNode
- Sass::Tree::MixinDefNode
- Sass::Tree::MixinNode
- Sass::Tree::Node
- Sass::Tree::PropNode
- Sass::Tree::ReturnNode
- Sass::Tree::RootNode
- Sass::Tree::RuleNode
- Sass::Tree::SupportsNode
- Sass::Tree::TraceNode
- Sass::Tree::VariableNode
- Sass::Tree::Visitors
- Sass::Tree::Visitors::Base
- Sass::Tree::Visitors::CheckNesting
- Sass::Tree::Visitors::Convert
- Sass::Tree::Visitors::Cssize
- Sass::Tree::Visitors::DeepCopy
- Sass::Tree::Visitors::Extend
- Sass::Tree::Visitors::Perform
- Sass::Tree::Visitors::SetOptions
- Sass::Tree::Visitors::ToCss
- Sass::Tree::WarnNode
- Sass::Tree::WhileNode
- Sass::UnitConversionError
- Sass::Util
- Sass::Util::MultibyteStringScanner
- Sass::Util::StaticConditionalContext
- Sass::Util::SubsetMap
- Sass::Util::Test
- Sass::Version
- ActionController
- ActionController::Base
- Object

No matching classes.

# Sass::Plugin::Configuration

### Public Instance Methods

add_template_location(template_location, css_location = options[:css_location]) click to toggle source

Adds a new template-location/css-location mapping. This means that Sass/SCSS files in `template_location` will be compiled to CSS files in `css_location`.

This is preferred over manually manipulating the {file:SASS_REFERENCE.md#template_location-option `:template_location` option} since the option can be in multiple formats.

Note that this method will change `options` to be in the Array format. This means that even if `options` had previously been a Hash or a String, it will now be an Array.

@param template_location [String] The location where Sass/SCSS files will be. @param css_location [String] The location where compiled CSS files will go.

    # File lib/sass/plugin/configuration.rb, line 62
    def add_template_location(template_location, css_location = options[:css_location])
      normalize_template_location!
      template_location_array << [template_location, css_location]
    end

default_options() click to toggle source

Different default options in a rails envirionment.

    # File lib/sass/plugin/rails.rb, line 6
    def default_options
      return @default_options if @default_options
      opts = {
        :quiet             => Sass::Util.rails_env != "production",
        :full_exception    => Sass::Util.rails_env != "production",
        :cache_location    => Sass::Util.rails_root + '/tmp/sass-cache'
      }

      opts.merge!(
        :always_update     => false,
        :template_location => Sass::Util.rails_root + '/public/stylesheets/sass',
        :css_location      => Sass::Util.rails_root + '/public/stylesheets',
        :always_check      => Sass::Util.rails_env == "development")

      @default_options = opts.freeze
    end

options() click to toggle source

An options hash. See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.

@return [{Symbol => Object}]

    # File lib/sass/plugin/configuration.rb, line 32
    def options
      @options ||= default_options.dup
    end

options=(value) click to toggle source

Sets the options hash. See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}. See {Sass::Plugin::Configuration#reset!} @deprecated Instead, modify the options hash in-place. @param value [{Symbol => Object}] The options hash

    # File lib/sass/plugin/configuration.rb, line 41
    def options=(value)
      Sass::Util.sass_warn("Setting Sass::Plugin.options is deprecated " +
                           "and will be removed in a future release.")
      options.merge!(value)
    end

remove_template_location(template_location, css_location = options[:css_location]) click to toggle source

Removes a template-location/css-location mapping. This means that Sass/SCSS files in `template_location` will no longer be compiled to CSS files in `css_location`.

This is preferred over manually manipulating the {file:SASS_REFERENCE.md#template_location-option `:template_location` option} since the option can be in multiple formats.

Note that this method will change `options` to be in the Array format. This means that even if `options` had previously been a Hash or a String, it will now be an Array.

@param template_location [String]

    The location where Sass/SCSS files were,
    which is now going to be ignored.

@param css_location [String]

    The location where compiled CSS files went, but will no longer go.

@return [Boolean]

    Non-`nil` if the given mapping already existed and was removed,
    or `nil` if nothing was changed.

    # File lib/sass/plugin/configuration.rb, line 88
    def remove_template_location(template_location, css_location = options[:css_location])
      normalize_template_location!
      template_location_array.delete([template_location, css_location])
    end

reset!() click to toggle source

Resets the options and {Sass::Callbacks::InstanceMethods#clear_callbacks! clears all callbacks}.

    # File lib/sass/plugin/configuration.rb, line 23
    def reset!
      @options = nil
      clear_callbacks!
    end

template_location_array() click to toggle source

Returns the template locations configured for Sass as an array of `[template_location, css_location]` pairs. See the {file:SASS_REFERENCE.md#template_location-option `:template_location` option} for details.

@return [Array<(String, String)>]

    An array of `[template_location, css_location]` pairs.

    # File lib/sass/plugin/configuration.rb, line 100
    def template_location_array
      old_template_location = options[:template_location]
      normalize_template_location!
      options[:template_location]
    ensure
      options[:template_location] = old_template_location
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.