class Tilt::SassTemplate

  1. lib/tilt/sass.rb
Superclass: StaticTemplate

Methods

Public Instance

  1. _prepare_output
  2. sass_options

Constants

ALLOWED_KEYS = (defined?(::Sass::Compiler) ? ::Sass::Compiler : ::Sass::Embedded). instance_method(:compile_string). parameters. map{|k, v| v if k == :key}. compact rescue nil  
Engine = ::SassC::Engine  

Public Instance methods

_prepare_output()
[show source]
   # File lib/tilt/sass.rb
38 def _prepare_output
39   ::Sass.compile_string(@data, **sass_options).css
40 end
sass_options()
[show 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