Class Sass::Script::Value::String
In: lib/sass/script/value/string.rb
Parent: Base

A SassScript object representing a CSS string or a CSS identifier.

Methods

check_deprecated_interp   inspect   new   plus   quote   separator   to_a   to_s   to_sass   value  

Attributes

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

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

value  [R]  The Ruby value of the string.

@return [String]

Public Class methods

Creates a new string.

@param value [String] See \{value} @param type [Symbol] See \{type} @param deprecated_interp_equivalent [String?]

  If this was created via a potentially-deprecated string interpolation,
  this is the replacement expression that should be suggested to the user.

Returns the quoted string representation of `contents`.

@options opts :quote [String]

  The preferred quote style for quoted strings. If `:none`, strings are
  always emitted unquoted. If `nil`, quoting is determined automatically.

@options opts :sass [String]

  Whether to quote strings for Sass source, as opposed to CSS. Defaults to `false`.

Public Instance methods

Prints a warning if this string was created using potentially-deprecated interpolation.

@see Value#plus

@see Value#to_s

@see Value#to_sass

[Validate]