Module: MaxFilter

Defined in:
lib/liquidum/liquid/filters/max_filter.rb

Instance Method Summary collapse

Instance Method Details

#max(input) ⇒ Object

Returns the max of the items in the array

input - the object array

Returns the max



9
10
11
12
13
14
# File 'lib/liquidum/liquid/filters/max_filter.rb', line 9

def max(input)
  return input unless input.respond_to?(:max)

  input = input.values if input.is_a?(Hash) # FIXME
  input.max
end