lib/zold/stress/air.rb in zold-stress-0.1.0 vs lib/zold/stress/air.rb in zold-stress-0.2.0

- old
+ new

@@ -36,16 +36,22 @@ @all end def add(pmt) @mutex.synchronize do - @all << pmt + @all << pmt.merge(pushed: Time.now) end end def delete(pmt) @mutex.synchronize do @all.delete(pmt) + end + end + + def pulled(id) + @mutex.synchronize do + @all.select { |a| a[:target] == id }.each { |a| a[:pulled] = Time.now } end end end end