Method: Sass::Script::Tree::StringInterpolation#to_sass
- Defined in:
- lib/sass/script/tree/string_interpolation.rb
#to_sass(opts = {})
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/sass/script/tree/string_interpolation.rb', line 51
def to_sass(opts = {})
quote = type == :string ? opts[:quote] || quote_for(self) || '"' : :none
opts = opts.merge(:quote => quote)
res = ""
res << quote if quote != :none
res << _to_sass(before, opts)
res << '#{' << @mid.to_sass(opts.merge(:quote => nil)) << '}'
res << _to_sass(after, opts)
res << quote if quote != :none
res
end
|