def check_for_failed_condition(conds)
      failed = (conds || []).find { |c, v| !check_condition?(c, v) }
      if failed
        failed[0] = failed[0][0..-2].to_sym if failed[0][-1] == '!'
      end
      failed
    end
def check_for_failed_condition(conds)
      failed = (conds || []).find { |c, v| !check_condition?(c, v) }
      if failed
        failed[0] = failed[0][0..-2].to_sym if failed[0][-1] == '!'
      end
      failed
    end
Tests the given conditions, returning the name of the first failed condition, or nil otherwise.