Module: MinFilter

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

Instance Method Summary collapse

Instance Method Details

#min(input) ⇒ Object

Returns the min of the items in the array

input - the object array

Returns the min



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

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

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