Class: Sprockets::SassImporter

### Home Classes Methods

### In Files

- lib/sprockets/sass_importer.rb

### Parent

Sass::Importers::Filesystem

### Methods

- ::new
- #find
- #find_relative

### Class/Module Index

Quicksearch

- Sprockets
- Sprockets::ArgumentError
- Sprockets::Asset
- Sprockets::AssetAttributes
- Sprockets::Base
- Sprockets::BundledAsset
- Sprockets::Cache
- Sprockets::Cache::FileStore
- Sprockets::Caching
- Sprockets::CharsetNormalizer
- Sprockets::CircularDependencyError
- Sprockets::ClosureCompressor
- Sprockets::Compressing
- Sprockets::ContentTypeMismatch
- Sprockets::Context
- Sprockets::DirectiveProcessor
- Sprockets::EcoTemplate
- Sprockets::EjsTemplate
- Sprockets::EncodingError
- Sprockets::EngineError
- Sprockets::Engines
- Sprockets::Environment
- Sprockets::Error
- Sprockets::FileNotFound
- Sprockets::FileOutsidePaths
- Sprockets::Index
- Sprockets::JstProcessor
- Sprockets::Manifest
- Sprockets::Mime
- Sprockets::NotImplementedError
- Sprockets::Paths
- Sprockets::ProcessedAsset
- Sprockets::ProcessedAsset::DependencyFile
- Sprockets::Processing
- Sprockets::Processor
- Sprockets::SafetyColons
- Sprockets::SassCacheStore
- Sprockets::SassCompressor
- Sprockets::SassFunctions
- Sprockets::SassImporter
- Sprockets::SassTemplate
- Sprockets::ScssTemplate
- Sprockets::Server
- Sprockets::StaticAsset
- Sprockets::UglifierCompressor
- Sprockets::UnserializeError
- Sprockets::Utils
- Sprockets::YUICompressor
- Rake
- Rake::SprocketsTask

No matching classes.

# Sprockets::SassImporter

This custom importer that tracks all imported filenames during compile.

### Attributes

imported_filenames[R]

### Public Class Methods

new(*args) click to toggle source

    # File lib/sprockets/sass_importer.rb, line 9
    def initialize(*args)
      @imported_filenames = []
      super
    end

### Public Instance Methods

find(*args) click to toggle source

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

find_relative(*args) click to toggle source

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.