adding concat filter to append arrays

This commit is contained in:
divecch
2015-03-25 01:31:22 -04:00
committed by Justin Li
parent bebd3570ee
commit db396dd739
4 changed files with 23 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
@@ -344,6 +348,10 @@ module Liquid
to_a.join(glue)
end
def concat(args)
to_a.concat args
end
def reverse
reverse_each.to_a
end