Module: ExecutableStories::Collector
- Defined in:
- lib/executable_stories/collector.rb
Class Method Summary collapse
Class Method Details
.all ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/executable_stories/collector.rb', line 21 def all @mutex ||= Mutex.new @collected ||= [] @mutex.synchronize do @collected.dup end end |
.next_order ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/executable_stories/collector.rb', line 29 def next_order @mutex ||= Mutex.new @order_seq ||= 0 @mutex.synchronize do n = @order_seq @order_seq += 1 n end end |
.record(test_case) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/executable_stories/collector.rb', line 13 def record(test_case) @mutex ||= Mutex.new @collected ||= [] @mutex.synchronize do @collected << test_case end end |
.reset ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/executable_stories/collector.rb', line 39 def reset @mutex ||= Mutex.new @mutex.synchronize do @collected = [] @order_seq = 0 end end |