bin/cvg in cvg-0.1.1 vs bin/cvg in cvg-0.1.2
- old
+ new
@@ -55,10 +55,21 @@
def pass?(row)
row.fetch(arg).to_s.present?
end
end
+ class AnyPresent < Test
+ class << self
+ def accept(k, arg)
+ new(k, arg) if k == 'any-present'
+ end
+ end
+ def pass?(row)
+ row.values_at(*cols).any?(&:present?)
+ end
+ end
+
class Missing < Test
class << self
def accept(k, arg)
new(k, arg) if k == 'missing'
end
@@ -209,10 +220,10 @@
def final?
true
end
end
- TESTS = [Present, Missing, Match, GreaterOrLesser, Dedup]
+ TESTS = [Present, Missing, Match, GreaterOrLesser, Dedup, AnyPresent]
FLAGS = {
'detect-missing' => DetectMissing,
'count' => Count,
}