Method: Sass::Script::Value::Base#with_contents

Defined in:
lib/sass/script/value/base.rb

#with_contents(contents, separator: self.separator, bracketed: self.bracketed) ⇒ Sass::Script::Value::List

Creates a new list containing contents but with the same brackets and separators as this object, when interpreted as a list.

Parameters:

  • contents (Array<Value>)

    The contents of the new list.

  • separator (Symbol) (defaults to: self.separator)

    The separator of the new list. Defaults to #separator.

  • bracketed (Boolean) (defaults to: self.bracketed)

    Whether the new list is bracketed. Defaults to #bracketed.

Returns:



244
245
246
# File 'lib/sass/script/value/base.rb', line 244

def with_contents(contents, separator: self.separator, bracketed: self.bracketed)
  Sass::Script::Value::List.new(contents, separator: separator, bracketed: bracketed)
end