class Sass::Importers::Base

@abstract
Importers should be serializable via ‘Marshal.dump`.
They should also implement the {#find_relative} method.
and interpret paths as relative to that.
should take a single load path in their constructor,
Importers that have some notion of “relative imports”
for pathnames.
however, subclasses are encouraged to use the URI format
This string can be interpreted however the importer wants;
and must return a {Sass::Engine} containing some Sass code.
At the most basic level, an importer is given a string
All importers should inherit from this.
The abstract base class for Sass importers.

def directories_to_watch

Returns:
  • (Array) - List of absolute paths of directories to watch
def directories_to_watch
  []
end

def find(uri, options)

Returns:
  • (Sass::Engine, nil) - An Engine containing the imported file,

Parameters:
  • options ({Symbol => Object}) -- Options for the Sass file
  • uri (String) -- The URI to import.
def find(uri, options)
  Sass::Util.abstract(self)
end

def find_relative(uri, base, options)

Returns:
  • (Sass::Engine, nil) - An Engine containing the imported file,

Parameters:
  • options ({Symbol => Object}) -- Options for the Sass file
  • base (String) -- The base filename. If `uri` is relative,
  • uri (String) -- The URI to import. This is not necessarily relative,
def find_relative(uri, base, options)
  Sass::Util.abstract(self)
end

def key(uri, options)

Returns:
  • ((String, String)) - The key pair which uniquely identifies

Parameters:
  • options ({Symbol => Object}) -- Options for the Sass file
  • uri (String) -- A URI known to be valid for this importer.
def key(uri, options)
  Sass::Util.abstract(self)
end

def mtime(uri, options)

Returns:
  • (Time, nil) -

Parameters:
  • options ({Symbol => Objet}) -- Options for the Sass file
  • uri (String) -- The URI of the file to check.
def mtime(uri, options)
  Sass::Util.abstract(self)
end

def public_url(uri, sourcemap_directory)

Returns:
  • (String?) - The publicly-visible URL for this file, or `nil`

Parameters:
  • sourcemap_directory (String, NilClass) -- The absolute path to a
  • uri (String) -- A URI known to be valid for this importer.
def public_url(uri, sourcemap_directory)
  return if @public_url_warning_issued
  @public_url_warning_issued = true
  Sass::Util.sass_warn <<WARNING
G: #{self.class.name} should define the #public_url method.
G
  nil
end

def to_s

Returns:
  • (String) -
def to_s
  Sass::Util.abstract(self)
end

def watched_file?(filename)

Returns:
  • (Boolean) - When the file changed should cause a recompile.

Parameters:
  • filename (String) -- The absolute filename for a file that has changed.
def watched_file?(filename)
  false
end