Class: JobIteration::TestHelper::StoppingSupervisor
- Inherits:
-
Object
- Object
- JobIteration::TestHelper::StoppingSupervisor
- Defined in:
- lib/job-iteration/test_helper.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(stop_after_count) ⇒ StoppingSupervisor
constructor
A new instance of StoppingSupervisor.
Constructor Details
#initialize(stop_after_count) ⇒ StoppingSupervisor
Returns a new instance of StoppingSupervisor.
7 8 9 10 |
# File 'lib/job-iteration/test_helper.rb', line 7 def initialize(stop_after_count) @stop_after_count = stop_after_count @calls = 0 end |
Instance Method Details
#call ⇒ Object
12 13 14 15 |
# File 'lib/job-iteration/test_helper.rb', line 12 def call @calls += 1 (@calls % @stop_after_count) == 0 end |