RDoc for group_by_exp

This commit is contained in:
Thiago Arrais 2016-11-04 18:32:52 -03:00
parent 7f18ac8f99
commit 7ac9653f4e
1 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,13 @@ module Jekyll
end end
end end
# Group an array of items by an expression
#
# input - the object array
# variable - the variable to assign each item to in the expression
# expression -a Liquid comparison expression passed in as a string
#
# Returns the filtered array of objects
def group_by_exp(input, variable, expression) def group_by_exp(input, variable, expression)
return input unless groupable?(input) return input unless groupable?(input)