class Sprockets::SassImporter - sprockets-2.11.3 Documentation

# class Sprockets::SassImporter

This custom importer adds sprockets dependency tracking on to Sass `@import` statements. This makes the Sprockets and Sass caching systems work together.

### Public Class Methods

new(context, root) click to toggle source
Calls superclass method

    # File lib/sprockets/sass_importer.rb, line 8
    def initialize(context, root)
      @context = context
      super root.to_s
    end

### Public Instance Methods

find(*args) click to toggle source
Calls superclass method

    # File lib/sprockets/sass_importer.rb, line 21
    def find(*args)
      engine = super
      if engine && (filename = engine.options[:filename])
        @context.depend_on(filename)
      end
      engine
    end

find_relative(*args) click to toggle source
Calls superclass method

    # File lib/sprockets/sass_importer.rb, line 13
    def find_relative(*args)
      engine = super
      if engine && (filename = engine.options[:filename])
        @context.depend_on(filename)
      end
      engine
    end