# File lib/compass/sass_compiler.rb, line 15
  def initialize(options = {}, config = Compass.configuration)
    options = options.dup
    self.config = config
    self.display_compilation_times = options.delete(:time)
    self.working_path = options.delete(:working_path) || Dir.pwd
    self.only_sass_files = options.delete(:only_sass_files) || []
    @quiet = options[:quiet]
    plugin_options = config.to_sass_plugin_options.merge(options)
    if only_sass_files.any?
      plugin_options[:template_location] = []
      plugin_options[:load_paths] = config.sass_load_paths
    end
    plugin_options[:always_update] = true if options.delete(:force)
    plugin_options[:compass] ||= {}
    plugin_options[:compass][:logger] = logger
    @compiler = Sass::Plugin::Compiler.new(plugin_options)
    @start_times = {}
    @error_count = 0

    public_methods(true).grep(/^when_/).each do |callback|
      @compiler.send(callback.to_s.sub(/^when_/, 'on_')) {|*args| send(callback, *args) }
    end
  end