Add modulo filter

This commit is contained in:
Jonathan Rudenberg
2011-11-17 14:08:57 -05:00
parent 745d875e79
commit c4d713b6bb
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -218,6 +218,10 @@ module Liquid
to_number(input) / to_number(operand)
end
def modulo(input, operand)
to_number(input) % to_number(operand)
end
private
def to_number(obj)