# File lib/sass/rails/template_handlers.rb, line 54 def self.engine_initialized? defined?(::Sass::Engine) end
# File lib/sass/rails/template_handlers.rb, line 97 def evaluate(scope, locals, &block) Sass::Engine.new(data, sass_options(scope)).render end
# File lib/sass/rails/template_handlers.rb, line 90 def importer(scope) Sass::Rails::Importer.new(scope) end
# File lib/sass/rails/template_handlers.rb, line 58 def initialize_engine require_template_library 'sass' end
# File lib/sass/rails/template_handlers.rb, line 94 def prepare end
# File lib/sass/rails/template_handlers.rb, line 70 def sass_options(scope) importer = self.importer(scope) options = sass_options_from_rails(scope) load_paths = (options[:load_paths] || []).dup load_paths.unshift(importer) resolver = Resolver.new(scope) css_filename = File.join(::Rails.public_path, resolver.public_path(scope.logical_path)) + ".css" options.merge( :filename => eval_file, :css_filename => css_filename, :line => line, :syntax => syntax, :importer => importer, :load_paths => load_paths, :custom => { :resolver => resolver } ) end
# File lib/sass/rails/template_handlers.rb, line 66 def sass_options_from_rails(scope) scope.environment.context_class.sass_config end
# File lib/sass/rails/template_handlers.rb, line 62 def syntax :sass end