Class Sass::Script::Tree::StringInterpolation
In: lib/sass/script/tree/string_interpolation.rb
Parent: Node

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

@see Interpolation

Methods

_perform   children   deep_copy   inspect   new   quote   to_sass   type  

Attributes

after  [R]  @return [StringInterpolation, Literal]
    The string literal or string interpolation before this interpolation.
before  [R]  @return [Literal] The string literal before this interpolation.
mid  [R]  @return [Node] The SassScript within the interpolation

Public Class methods

Interpolation in a string is of the form `"before #{mid} after"`, where `before` and `after` may include more interpolation.

@param before [StringInterpolation, Literal] See {StringInterpolation#before} @param mid [Node] See {StringInterpolation#mid} @param after [Literal] See {StringInterpolation#after}

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

Returns the quote character that should be used to wrap a Sass representation of this interpolation.

Whether this is a CSS string or a CSS identifier. The difference is that strings are written with double-quotes, while identifiers aren‘t.

String interpolations are only ever identifiers if they‘re quote-like functions such as `url()`.

@return [Symbol] `:string` or `:identifier`

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]