Class/Module Index [+]

Quicksearch

Sass::Importers::DeprecatedPath

This importer emits a deprecation warning the first time it is used to import a file. It is used to deprecate the current working directory from the list of automatic sass load paths.

Public Class Methods

new(root) click to toggle source

@param root [String] The absolute, expanded path to the folder that is deprecated.

# File lib/sass/importers/deprecated_path.rb, line 8
def initialize(root)
  @specified_root = root
  @warning_given = false
  super
end

Public Instance Methods

directories_to_watch() click to toggle source

@see Base#directories_to_watch

# File lib/sass/importers/deprecated_path.rb, line 25
def directories_to_watch
  # The current working directory was not watched in Sass 3.2,
  # so we continue not to watch it while it's deprecated.
  []
end
find(*args) click to toggle source

@see Sass::Importers::Base#find

# File lib/sass/importers/deprecated_path.rb, line 15
def find(*args)
  found = super
  if found && !@warning_given
    @warning_given = true
    Sass::Util.sass_warn deprecation_warning
  end
  found
end
to_s() click to toggle source

@see Sass::Importers::Base#to_s

# File lib/sass/importers/deprecated_path.rb, line 32
def to_s
  "#{@root} (DEPRECATED)"
end

Protected Instance Methods

deprecation_warning() click to toggle source

@return [String] The deprecation warning that will be printed the first

time an import occurs.
# File lib/sass/importers/deprecated_path.rb, line 40
def deprecation_warning
  path = @specified_root == "." ? "the current working directory" : @specified_root
  DEPRECATION WARNING: Importing from #{path} will not beautomatic in future versions of Sass.  To avoid future errors, you can add itto your environment explicitly by setting `SASS_PATH=#{@specified_root}`, by using the -I commandline option, or by changing your Sass configuration options.
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.