Class Sass::Script::Tree::Interpolation
In: lib/sass/script/tree/interpolation.rb
Parent: Node

A SassScript object representing `#{}` interpolation outside a string.

@see StringInterpolation

Methods

_perform   children   deep_copy   inspect   new   to_sass  

Attributes

after  [R]  @return [Node] The SassScript after the interpolation
before  [R]  @return [Node] The SassScript before the interpolation
mid  [R]  @return [Node] The SassScript within the interpolation
originally_text  [R]  @return [Boolean] Whether the original format of the interpolation was
  plain text, not an interpolation. This is used when converting back to
  SassScript.
warn_for_color  [R]  @return [Boolean] Whether a color value passed to the interpolation should
  generate a warning.
whitespace_after  [R]  @return [Boolean] Whether there was whitespace between `}` and `after`
whitespace_before  [R]  @return [Boolean] Whether there was whitespace between `before` and `#{`

Public Class methods

Interpolation in a property is of the form `before #{mid} after`.

@param before [Node] See {Interpolation#before} @param mid [Node] See {Interpolation#mid} @param after [Node] See {Interpolation#after} @param wb [Boolean] See {Interpolation#whitespace_before} @param wa [Boolean] See {Interpolation#whitespace_after} @param originally_text [Boolean] See {Interpolation#originally_text} @param warn_for_color [Boolean] See {Interpolation#warn_for_color} @comment

  rubocop:disable ParameterLists

Public Instance methods

Returns the three components of the interpolation, `before`, `mid`, and `after`.

@return [Array<Node>] @see initialize @see Node#children

@return [String] A human-readable s-expression representation of the interpolation

Protected Instance methods

Evaluates the interpolation.

@param environment [Sass::Environment] The environment in which to evaluate the SassScript @return [Sass::Script::Value::String]

  The SassScript string that is the value of the interpolation

[Validate]