class Forall::Counter
Attributes
fail[RW]
labels[R]
no[RW]
ok[RW]
shrunk[R]
skip[RW]
steps[RW]
Public Class Methods
new(top = true)
click to toggle source
# File lib/forall/counter.rb, line 9 def initialize(top = true) @ok = 0 @no = 0 @skip = 0 @fail = 0 @steps = 0 @shrunk = Counter.new(false) if top @labels = Hash.new{|h,k| h[k] = 0 } @private = nil end
Public Instance Methods
label!(*names)
click to toggle source
# File lib/forall/counter.rb, line 33 def label!(*names) names.each do |x| @labels[x] += 1 end end
skip!()
click to toggle source
# File lib/forall/counter.rb, line 28 def skip! @skip += 1 throw :skip, true end
test()
click to toggle source
# File lib/forall/counter.rb, line 24 def test @ok + @no + @fail end
total()
click to toggle source
# File lib/forall/counter.rb, line 20 def total @ok + @no + @skip + @fail end