Class: Sass::Engine

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

Overview

Monkey Path Sass Adapted from: github.com/chriseppstein/sass-css-importer

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/JsonImporter.rb', line 9

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

  json_importer = self.options[:load_paths].find {|lp| lp.is_a?(Sass::Importers::JsonImporter) }

  unless json_importer
    root = File.dirname(options[:filename] || ".")
    self.options[:load_paths] << Sass::Importers::JsonImporter.new(root)
  end
end

Instance Method Details

#initialize_without_json_importerObject



7
# File 'lib/JsonImporter.rb', line 7

alias initialize_without_json_importer initialize