Merge pull request #540 from Shopify/array-concat

Add array concat filter
This commit is contained in:
Justin Li
2015-03-25 01:42:22 -04:00
4 changed files with 28 additions and 4 deletions
+8
View File
@@ -177,6 +177,10 @@ module Liquid
input.to_s + string.to_s
end
def concat(input, array)
InputIterator.new(input).concat(array)
end
# prepend a string to another
def prepend(input, string)
string.to_s + input.to_s
@@ -346,6 +350,10 @@ module Liquid
to_a.join(glue)
end
def concat(args)
to_a.concat args
end
def reverse
reverse_each.to_a
end