Class Index [+]

Quicksearch

Sass::Script

SassScript is code that’s embedded in Sass documents to allow for property values to be computed from variables.

This module contains code that handles the parsing and evaluation of SassScript.

Constants

MATCH

The regular expression used to parse variables.

VALIDATE

The regular expression used to validate variables without matching.

Public Class Methods

equals_warning(types, name, val, guarded, line, offset, filename) click to toggle source

@private

    # File lib/sass/script.rb, line 52
52:     def self.equals_warning(types, name, val, guarded, line, offset, filename)
53:       Haml::Util.haml_warn DEPRECATION WARNING:On line #{line}#{", character #{offset}" if offset}#{" of '#{filename}'" if filename}Setting #{types} with #{"||" if guarded}= has been deprecated and will be removed in version 3.2.Use "#{name}: #{val}#{" !default" if guarded}" instead.You can use `sass-convert --in-place --from sass2 file.sass' to convert files automatically.
54:     end
parse(value, line, offset, options = {}) click to toggle source

Parses a string of SassScript

@param value [String] The SassScript @param line [Fixnum] The number of the line on which the SassScript appeared.

  Used for error reporting

@param offset [Fixnum] The number of characters in on `line` that the SassScript started.

  Used for error reporting

@param options [{Symbol => Object}] An options hash;

  see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}

@return [Script::Node] The root node of the parse tree

    # File lib/sass/script.rb, line 31
31:     def self.parse(value, line, offset, options = {})
32:       Parser.parse(value, line, offset, options)
33:     rescue Sass::SyntaxError => e
34:       e.message << ": #{value.inspect}." if e.message == "SassScript error"
35:       e.modify_backtrace(:line => line, :filename => options[:filename])
36:       raise e
37:     end
var_warning(varname, line, offset, filename) click to toggle source

@private

    # File lib/sass/script.rb, line 40
40:     def self.var_warning(varname, line, offset, filename)
41:       Haml::Util.haml_warn DEPRECATION WARNING:On line #{line}, character #{offset}#{" of '#{filename}'" if filename}Variables with ! have been deprecated and will be removed in version 3.2.Use \"$#{varname}\" instead.You can use `sass-convert --in-place --from sass2 file.sass' to convert files automatically.
42:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.