Class: Sass::Engine

Inherits:
Object
  • Object
show all
Defined in:
lib/graphite/monkeypatch.rb

Overview

Taken from github.com/chriseppstein/sass-css-importer/blob/master/lib/sass/css_importer/monkey_patches.rb TODO: This feels wrong, surely there must be a better way to handle this

Instance Method Summary collapse

Constructor Details

#initialize(template, options = {}) ⇒ Engine

Returns a new instance of Engine.



9
10
11
12
13
14
15
16
17
18
# File 'lib/graphite/monkeypatch.rb', line 9

def initialize(template, options={})
    initialize_without_graphite_importer(template, options)

    graphite_importer = self.options[:load_paths].find {|lp| lp.is_a?(Graphite::Importer) }

    unless graphite_importer
        root = File.dirname(options[:filename] || ".")
        self.options[:load_paths] << Graphite::Importer.new(root)
    end
end

Instance Method Details

#initialize_without_graphite_importerObject



7
# File 'lib/graphite/monkeypatch.rb', line 7

alias initialize_without_graphite_importer initialize