Class: Quiver::DutyTestHelper::MemoryHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/quiver/duty_test_helper/memory_helper.rb

Instance Method Summary collapse

Instance Method Details

#carry_out(count) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/quiver/duty_test_helper/memory_helper.rb', line 4

def carry_out(count)
  count.times do
    duty_data = Quiver::DutyMaster::MemoryAdapter.queue_array.shift
    next unless duty_data

    duty = duty_data[:duty_class].new(*duty_data[:arguments])
    duty.perform
  end
end