class SassC::Script::Value::String
def self.quote(contents, opts = {})
@options opts :sass [String]
always emitted unquoted. If `nil`, quoting is determined automatically.
The preferred quote style for quoted strings. If `:none`, strings are
@options opts :quote [String]
Returns the quoted string representation of `contents`.
def self.quote(contents, opts = {}) contents = ::Sass::Value::String.new(contents, quoted: opts[:quote] != :none).to_s opts[:sass] ? contents.gsub('#', '\#') : contents end
def to_s(opts = {})
def to_s(opts = {}) opts = { quote: :none }.merge!(opts) if @type == :identifier self.class.quote(@value, opts) end