Created
January 13, 2013 20:09
-
-
Save Snugug/4525934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split_string(string, key) | |
items = string.value.split(" " + key.value + " ") | |
if items.count == 1 | |
Sass::Script::Bool.new(false) | |
else | |
Sass::Script::List.new(items, :comma) | |
end | |
end |
def split_string(string, key)
items = string.value.split(" " + key.value + " ")
if items.count == 1
Sass::Script::Bool.new(false)
else
result = Array.new
items.each_with_index do |elem, i|
result[i] = Sass::Script::String.new(elem)
end
Sass::Script::List.new(result, :comma)
end
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get the following error when trying to return the List
The input is the following: