class Tilt::SassTemplate

Constants

ALLOWED_KEYS
Engine

Public Instance Methods

_prepare_output() click to toggle source
   # File lib/tilt/sass.rb
38 def _prepare_output
39   ::Sass.compile_string(@data, **sass_options).css
40 end
sass_options() click to toggle source
   # File lib/tilt/sass.rb
42 def sass_options
43   path = File.absolute_path(eval_file)
44   path = '/' + path unless path.start_with?('/')
45   opts = @options.dup
46   opts[:url] = ::URI::File.build([nil, ::URI::DEFAULT_PARSER.escape(path)]).to_s
47   opts[:syntax] = :indented
48   opts.delete_if{|k| !ALLOWED_KEYS.include?(k)} if ALLOWED_KEYS
49   opts
50 end