Method: Sass::Importers::Base#key

Defined in:
lib/sass/importers/base.rb

#key(uri, options) ⇒ (String, String)

Get the cache key pair for the given Sass URI. The URI need not be checked for validity.

The only strict requirement is that the returned pair of strings uniquely identify the file at the given URI. However, the first component generally corresponds roughly to the directory, and the second to the basename, of the URI.

Note that keys must be unique across importers. Thus it's probably a good idea to include the importer name at the beginning of the first component.

Parameters:

  • uri (String)

    A URI known to be valid for this importer.

  • options ({Symbol => Object})

    Options for the Sass file containing the @import currently being checked.

Returns:

  • ((String, String))

    The key pair which uniquely identifies the file at the given URI.



121
122
123
# File 'lib/sass/importers/base.rb', line 121

def key(uri, options)
  Sass::Util.abstract(self)
end