module Middleman::Util
def should_ignore?(validator, value)
def should_ignore?(validator, value) if validator.is_a? Regexp # Treat as Regexp !!(value =~ validator) elsif validator.respond_to? :call # Treat as proc validator.call(value) elsif validator.is_a? String # Treat as glob File.fnmatch(value, validator) else # If some unknown thing, don't ignore false end end