Method: Sass::Script::Tree::StringInterpolation#_perform

Defined in:
lib/sass/script/tree/string_interpolation.rb

#_perform(environment) ⇒ Sass::Script::Value::String (protected)

Evaluates the interpolation.

Parameters:

  • environment (Sass::Environment)

    The environment in which to evaluate the SassScript

Returns:

[View source]

89
90
91
92
93
94
95
96
97
# File 'lib/sass/script/tree/string_interpolation.rb', line 89

def _perform(environment)
  res = ""
  before = @before.perform(environment)
  res << before.value
  mid = @mid.perform(environment)
  res << (mid.is_a?(Sass::Script::Value::String) ? mid.value : mid.to_s(:quote => :none))
  res << @after.perform(environment).value
  opts(Sass::Script::Value::String.new(res, before.type))
end