83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# File 'lib/sass/script/value/helpers.rb', line 83
def list(*elements, separator: nil, bracketed: false)
# Support passing separator as the last value in elements for
# backwards-compatibility.
if separator.nil?
if elements.last.is_a?(Symbol)
separator = elements.pop
else
raise ArgumentError.new("A separator of :space or :comma must be specified.")
end
end
if elements.size == 1 && elements.first.is_a?(Array)
elements = elements.first
end
Sass::Script::Value::List.new(elements, separator: separator, bracketed: bracketed)
end
|