Class: Sass::Engine

Inherits:
Object
  • Object
show all
Defined in:
lib/compass/import-once/activate.rb

Class Method Summary collapse

Class Method Details

.new(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/compass/import-once/activate.rb', line 4

def self.new(*args)
  instance = super
  instance.extend(Compass::ImportOnce::Engine)
  if i = instance.options[:importer]
    i.extend(Compass::ImportOnce::Importer) unless i.is_a?(Compass::ImportOnce::Importer)
  end
  instance.options[:load_paths].each do |path|
    if path.is_a?(Sass::Importers::Base) && !path.is_a?(Compass::ImportOnce::Importer)
      path.extend(Compass::ImportOnce::Importer)
    elsif !path.is_a?(Sass::Importers::Base)
      Sass::Util.sass_warn "WARNING: #{path.inspect} is on the load path and is not an importer."
    end
  end
  instance
end