Class Sass::Importers::Filesystem
In: lib/sass/importers/filesystem.rb
Parent: Base

The default importer, used for any strings found in the load path. Simply loads Sass files from the filesystem using the default logic.

Methods

Constants

REDUNDANT_DIRECTORY = %r{#{Regexp.escape(File::SEPARATOR)}\.#{Regexp.escape(File::SEPARATOR)}}

Attributes

root  [RW] 

Public Class methods

Creates a new filesystem importer that imports files relative to a given path.

@param root [String] The root path.

  This importer will import files relative to this path.

Public Instance methods

Protected Instance methods

A hash from file extensions to the syntaxes for those extensions. The syntaxes must be `:sass` or `:scss`.

This can be overridden by subclasses that want normal filesystem importing with unusual extensions.

@return [{String => Symbol}]

Given a base directory and an `@import`ed name, finds an existant file that matches the name.

@param dir [String] The directory relative to which to search. @param name [String] The filename to search for. @return [(String, Symbol)] A filename-syntax pair.

Given an `@import`ed path, returns an array of possible on-disk filenames and their corresponding syntaxes for that path.

@param name [String] The filename. @return [Array(String, Symbol)] An array of pairs.

  The first element of each pair is a filename to look for;
  the second element is the syntax that file would be in (`:sass` or `:scss`).

If a full uri is passed, this removes the root from it otherwise returns the name unchanged

Splits a filename into three parts, a directory part, a basename, and an extension Only the known extensions returned from the extensions method will be recognized as such.

[Validate]