Module: Compass::ImportOnce

### Home Classes Methods

### In Files

- lib/compass/import-once.rb
- lib/compass/import-once/engine.rb
- lib/compass/import-once/importer.rb
- lib/compass/import-once/version.rb

### Namespace

- MODULE Compass::ImportOnce::Engine
- MODULE Compass::ImportOnce::Importer

### Methods

- ::activate!
- ::import_tracker

### Class/Module Index

Quicksearch

- Compass
- Compass::ImportOnce
- Compass::ImportOnce::Engine
- Compass::ImportOnce::Importer
- Sass
- Sass::Engine

No matching classes.

# Compass::ImportOnce

although this is part of the compass suite of gems, it doesn't depend on compass, so any sass-based project can use to to get import-once behavior for all of their importers.

although this is part of the compass suite of gems, it doesn't depend on compass, so any sass-based project can use to to get import-once behavior for all of their importers.

### Constants

VERSION

### Public Class Methods

activate!() click to toggle source

    # File lib/compass/import-once.rb, line 23
    def activate!
      require 'compass/import-once/activate'
    end

import_tracker() click to toggle source

A map of css filenames to a set of engine cache keys that uniquely identify what has been imported. The lifecycle of each key is handled by code wrapped around Sass's render, to_css and render_with_sourcemap methods on the Sass::Engine.

Ideally, Sass would provide a place in it's public API to put information that persists for only the duration of a single compile and would be accessible for all sass engines and sass functions written in ruby.

    # File lib/compass/import-once.rb, line 19
    def import_tracker
      Thread.current[:import_once_tracker] ||= {}
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.